You assume company is unique? I am not sure about that, if that's not the case you can try something like this, while **$company** is the company name $customers = Mage::getModel('customer/customer')->getCollection(); $customers->addFieldToFilter('company', array('like' => '%' . $company . '%')); foreach ($customers as $customer){ print_r($customer->getId()); } You can change the `like` statement for an equal if you are sure **$company** contains the exact value $customers->addFieldToFilter('company', array('eq' => $company));