4 IFs

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,226
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
A1=1 or ""null (thr' formula)
B1=HOLD or null (thr' formula)

If:
A1=1 and B1=HOLD; C1=100
A1=1 and B1=""null; C1=200
A1=""null and B1=HOLD; C1=300
A1=""null and B1=""null; C1=400
How to get either of C1?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Try putting your possible combinations into a table of 4 rows x 3 columns (1st column for A, 2nd for B and 3rd for C values).

Once you've done that you can use SUMPRODUCT to get the C1 values.

Say my table was located in F1:H4 so the whole function in C1 would be

=SUMPRODUCT(--(F1:F4=A1),--(G1:G4=B1),H1:H4)
 
Upvote 0
Try this ...
Code:
=IF(AND(A1=1,B1="HOLD"),100,IF(AND(A1=1,B1=1),200,IF(AND(A1=1,B1=""),200,IF(AND(A1="",B1="HOLD"),300,IF(AND(A1="",B1=""),400,"")))))
 
Upvote 0
Code:
=IF(AND(A1=1,B1="HOLD"),100,IF(AND(A1=1,B1=1),200,IF(AND(A1=1,B1=""),200,IF(AND(A1="",B1="HOLD"),300,IF(AND(A1="",B1=""),400,"")))))
[/QUOTE]
This works.
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,270
Members
452,628
Latest member
dd2

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