SOLVED

#Name? error

Copper Contributor

I have used Data Validation in cell F4 to create a drop down of three names. Based on which name is selected, I would like cell F5 to populate a particular email address and also leave blank if cell F4 has not been selected. When I input the below, I receive the #Name? error. Can someone please review and let me know what I am doing incorrectly? Thanks in advance

 

=IF(F4=Anna, "email address removed for privacy reasons",IF(F4=Sally,"email address removed for privacy reasons",IF(F4=Diana,"email address removed for privacy reasons")))

4 Replies
best response confirmed by Nickelbox (Copper Contributor)
Solution

@Nickelbox 

Literal text strings must be enclosed in quotes:

 

=IF(F4="Anna", ..., IF(F4="Sally", ..., IF(F4="Diana, ..., "")))

 

or

 

=IFS(F4="Anna", ..., F4="Sally", ..., F4="Diana", ..., TRUE, "")

So I went with the first and it works but any cell (in G column) that doesn't have a name selected in the F column says False. How do I correct this?

@Nickelbox 

Did you add , "" before the closing parentheses? That should make the formula return an empty string "" if you haven't entered any of the specified names.

@Hans Vogelaar 

That worked, thanks!

1 best response

Accepted Solutions
best response confirmed by Nickelbox (Copper Contributor)
Solution

@Nickelbox 

Literal text strings must be enclosed in quotes:

 

=IF(F4="Anna", ..., IF(F4="Sally", ..., IF(F4="Diana, ..., "")))

 

or

 

=IFS(F4="Anna", ..., F4="Sally", ..., F4="Diana", ..., TRUE, "")

View solution in original post