# If Function

Options
✭✭✭

I need a formula to assign people to a cell based on a person assigned in another cell.

For instance:

If the cell is assigned to Russ, Tyler or Kirk it needs to say Lauren.

If the cell is assigned to Mason, Bryan or Will then it needs to say Cynthia.

Column name is "Assigned To" and the first name goes in line 2

Tags:

• ✭✭✭✭✭✭
edited 07/03/24
Options

Try this!

=IF(OR([Assigned To]@row = "Russ", [Assigned To]@row = "Tyler", [Assigned To]@row = "Kirk"), "Lauren", IF(OR([Assigned To]@row = "Mason", [Assigned To]@row = "Bryan", [Assigned To]@row = "Will"), "Cynthia", ""))

BRgds,
-Ray

• ✭✭✭
Options

It's giving a circular reference error. I think it needs to call out Line 2, correct? I want it to change from Lauren or Cynthia based on the name in "Assigned To" on line 2.

• ✭✭✭✭✭✭
Options

Ahh. You are trying to reference a name that exists in the same column. You can't create a column formula to do that. You would have to apply a formula to each row. Otherwise that's the reason for the circular reference (circling back to the same column the formula is in). If you were assigning someone to a column based off who is assigned in another column, then you could use a column formula.

• ✭✭✭✭✭✭
Options

Here is how I tested the formula using 2 columns. The formula is in the "Person" column.

• ✭✭✭
edited 07/03/24
Options

I can add a column and make it match the name in "Assigned To" row 2. The new column is named "Invoicing". I changed the formula and put Invoicing where you had Assigned to. Just need to adjust the formula a little bit. It is blank at the moment.

• ✭✭✭
Options

@Ray Lindstrom I fixed one of my errors and got this to work and wanted to say thanks for the help! Couldn't have done it without you!

• ✭✭✭✭✭✭
Options

So happy to hear that you got it working. Way to go!

BRgds,
-Ray

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!