Forum Discussion
maddjohn1985
Sep 09, 2024Copper Contributor
I want to make a cell equal a value based on the value in a list
I'm making a template where I want a cell to populate with a value depending on what value has been selected from a list. Example Cell A1 has list Red Yellow Orange Pink Blue If R...
maddjohn1985
Sep 09, 2024Copper Contributor
Thanks, that's worked a treat.
I've now also come across an issue where I need a cell to populate one of 3 values based on the contents of 2 cells.
So If B18 equals Blue and B20 equals Red then B23 equals 1234 but if B18 equals Blue and B20 equals Yellow them B23 equals 5678, but if B18 equals Pink and B20 equals Yellow then B23 equals 9876
Hopefully that's also possible and again appreciate your help
Martin_Angosto
Sep 09, 2024Iron Contributor
Glad it initially worked!
For this second purpose, you can use:
=IF(AND(B18 = "Blue", B20 = "Red"), 1234, IF(AND(B18 = "Blue", B20 = "Yellow"), 5678, IF(AND(B18 = "Pink", B20 = "Yellow"), 9876, "")))
Note that in the event that none of the two scenarios/combinations exist, the formulation would just leave cell B23 blank.