How can I fill in a field with a name if my Location column is a specific city?

I am attempting to autofill data into a field (person's name/contact) if the city is the one they administer. I am receiving an incorrect arguement statement error. Here is what I have so far.
=IF(CONTAINS("Milwaukee", Location@row, "Michelle"), IF(CONTAINS("Appleton", Location@row, "Stephanie"), IF(CONTAINS("Madison", Location@row, "Tammy"))))
Any help would be greatly appreciated!
Best Answer
-
An IF statement has three conditions, Expression, Value if True and Value if False.
Currently, you just have IF(CONTAINS stacked without resolving any of them, which is giving you the error.
I would recommend something more in line with the following:
IF(Location@row = "Milwaukee", "Michelle", If(Location@row = "Appleton", "Stephanie", If(Location@row = "Madison", "Tammy", "ERROR"))) essentially this formula is going to another IF statement if the preceeding IF statement was not true.
The "ERROR" will return if a value other than Milwaukee, Appleton, or Madison is selected. So make sure all locations have a name assigned.
@ me know if this doesnt help!
Answers
-
An IF statement has three conditions, Expression, Value if True and Value if False.
Currently, you just have IF(CONTAINS stacked without resolving any of them, which is giving you the error.
I would recommend something more in line with the following:
IF(Location@row = "Milwaukee", "Michelle", If(Location@row = "Appleton", "Stephanie", If(Location@row = "Madison", "Tammy", "ERROR"))) essentially this formula is going to another IF statement if the preceeding IF statement was not true.
The "ERROR" will return if a value other than Milwaukee, Appleton, or Madison is selected. So make sure all locations have a name assigned.
@ me know if this doesnt help!
-
@NickStaffordPM Thank you!! That worked perfectly!
Help Article Resources
Categories
Check out the Formula Handbook template!