Question: On the Account page, I have a lookup for Secondary Contact. I also have two formula fields: Secondary Contact Email and Secondary Contact Phone. 

If you choose someone in the Secondary Contact field, it should populate the Secondary Contact Email and Secondary Contact Phone fields. And this is mostly happening. 

I have three email fields on the contact record: Preferred Email, Work Email, and Alternate Email. I can get Preferred and Work to populate the formula in accounts but Alternate will not come into accounts. I am lost....What am I doing wrong?

```
IF(NOT(ISBLANK(Secondary_Contact__r.npe01__HomeEmail__c)), Secondary_Contact__r.npe01__HomeEmail__c, 
    IF(ISBLANK(Secondary_Contact__r.npe01__HomeEmail__c), Secondary_Contact__r.npe01__WorkEmail__c, 
        IF( AND( ISBLANK(Secondary_Contact__r.npe01__HomeEmail__c), ISBLANK(Secondary_Contact__r.npe01__WorkEmail__c)), Secondary_Contact__r.npe01__AlternateEmail__c, 
            null
        )
    )
)

```

Answer: 
Something like this should work

```
IF(NOT(ISBLANK(Secondary_Contact__r.npe01__HomeEmail__c))
        ,Secondary_Contact__r.npe01__HomeEmail__c, 
    (IF(NOT(ISBLANK(Secondary_Contact__r.npe01__WorkEmail__c))),Secondary_Contact__r.npe01__WorkEmail__c, 
        Secondary_Contact__r.npe01__AlternateEmail__c))

```

Your version is overcomplicated because you are rechecking things in the "else" part.

If you are in the "else" of `NOT(ISBLANK(Secondary_Contact__r.npe01__HomeEmail__c))` then you do not need to check again `ISBLANK(Secondary_Contact__r.npe01__HomeEmail__c))`
You can try `BLANKVALUE`:

```
BLANKVALUE(Secondary_Contact__r.npe01__HomeEmail__c,
    BLANKVALUE(
        Secondary_Contact__r.npe01__WorkEmail__c,
        Secondary_Contact__r.npe01__AlternateEmail__c
    )
)

```

What this formula says is basically:

1. If the `Home Email` is not blank, use that value.
2. Else if `Work Email` is not blank, use that value.
3. Else use `Alternate Email`.