+ Start a Discussion
rornelasrornelas 

help with formula field If lookup is blank

I have a Custom Object with two lookups. One lookup is to the Account and the other is to Contacts.I want a formula field  that will check IF Account Lookup is populated use billing address, else, Use Contacts Mailing address and in the event that both lookups are populated it should default to the account lookup address

 
Deepak Maheshwari 7Deepak Maheshwari 7

Hi,

 

Please create a formula field of Text return type and use below formula:

 

IF( ISBLANK( Account__c ) , Contact__r.MailingStreet +" "+ Contact__r.MailingCity+" "+ Contact__r.MailingState+" "+  Contact__r.MailingPostalCode+" "+Contact__r.MailingCountry    ,  Account__r.BillingStreet  +" "+Account__r.BillingCity+" "+Account__r.BillingState+" "+Account__r.BillingPostalCode+" "+Account__r.BillingCountry)

 

Thanks

Deepak Maheshwari 7Deepak Maheshwari 7

Hi,

 

Please let me know if this formula worked for you.

 

Thanks

Aisha ShresthaAisha Shrestha
Hi Deepak,

The solution worked for me.

Thanks