Is it possible to have multiple IF for one Cell? example if leftA1 =4455,"Maro" if=5522, "John" and so on... I work in shipping and when I scan a product shipping label I need it to show the courier company/ Thank you
Asked
Active
Viewed 32 times
1
-
For more info see https://support.microsoft.com/en-us/office/if-function-nested-formulas-and-avoiding-pitfalls-0b22ff44-f149-44ba-aeb5-4ef99da241c8 – Gantendo Mar 08 '22 at 16:07
-
What do you get when you try it? – Toto Mar 08 '22 at 16:08
-
https://support.microsoft.com/en-us/office/ifs-function-36329a26-37b2-467c-972b-4a39bd951d45 IFS function. – Lee Mar 09 '22 at 09:32
2 Answers
4
You can nest IFs:
=IF(LEFT(A1,4)="1z33","UPS",IF(LEFT(A1,4)="4455","fedex",...))
continue nesting them till you have exhausted the list.
You can also use IFS if you have it:
=IFS(LEFT(A1,4)="1z33","UPS",LEFT(A1,4)="4455","fedex",...)
You can also use NDEX/MATCH if it is always looking at the first four characters:
=INDEX({"UPS","fedex",...},MATCH(LEFT(A1,4),{"1z33","4455",...},0))
Scott Craner
- 22,693
- 3
- 21
- 25