Need help with format....
I have created a formula field for address (pulls in Account address if Contact address is blank)- however, the format is off when pulled:
- Ex. 1 - 6789 Native AvenueNativeNevada67899 (no spaces or commas) - pulling from Account
- Ex. 2 - elm street, miami, , Arizona33333, United States (extra comma and no space) - pulling from Contact
Attached are the address on account and contact - what I want the formula field format to look like
Here is the formula:
IF(ISBLANK(MailingState), IF( CASE(Account.Account_Type__c, "Manufacturer",1, "Wholesaler",1, "Distributor",1, "Education",1, "Other",1, IF(ISBLANK(Text(Account.Account_Type__c)),1,0))=0, Account.BillingStreet+""+Account.BillingCity+""+Account.BillingState+""+Account.BillingPostalCode+"", NULL), Mailing_Address_String__c)
Eric Praud (Activ8 Solar Energies) Forum Ambassador
Well, there you go. You can see the commas in this formula in between quotation marks ", "
So, when the mailing street (Conatct address) is blank, your formual was not adding spaces since you need them in between quotation marks, as per my formula.
When it is populated, it returns this formula that has commas. Also, the reason you are getting 2 commas is here:
& MailingCity & ", " & IF(NOT(ISBLANK(MailingState)),", " & MailingState,"" )
You are asking for the Mailing City, a comma, and if the Mailing state is not blank, nother comma then the Mailing State (and then no space and the zip code)