3 IF Statements

Ian_A85

New Member
Joined
Nov 26, 2010
Messages
21
Hi all,

Really simple one today, I need to know how to put 3 If statements in one formula

I have to use:
=IF(U:U="Supplier1",100,0)
=IF(U:U="Supplier2",125,0)
=IF(U:U="Supplier3",150,0)

All 3 work seperately, but i need them in one cell, please help!
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Im not sure about your U:U - how can a whole column equal a string? If you mean each cell in the column, try this:

=IF($U1="Supplier1",100,IF($U1="Supplier2",125,IF($U1="Supplier3",150,0)))

and copy it down
 
Upvote 0
=CHOOSE(MATCH(U:U,{"Supplier1","Supplier2","Supplier3"},FALSE),100,125,150)
 
Upvote 0
Thats great, the CHOOSE option is brilliant, one final thing, how easy it to add a IF none are chosen, it returns 0?
 
Upvote 0
Easy to do but the formula starts to get messy!

=IF(ISNA(MATCH(U:U,{"Supplier1","Supplier2","Supplier3"},FALSE)),0,CHOOSE(MATCH(U:U,{"Supplier1","Supplier2","Supplier3"},FALSE),100,125,150))

If you're going to start adding lots more suppliers I would recommend placing the names and values in a separate lookup table and using VLOOKUP: that would make the formula simpler and it means you don't have to change the list wherever it occurs in a formula - just once in the lookup table.
 
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,732
Members
449,093
Latest member
Mnur

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top