Multiple IF

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
959
Office Version
  1. 2007
Platform
  1. Windows
I want to get 10, 20, 30 or 40 in F2 as:

F2=10 IF B2=0 AND C2=TRUE
F2=20 IF B2=0 AND C2=FALSE
F2=10 IF B2=1 AND C2=TRUE
F2=10 IF B2=1 AND C2= FALSE

ELSE
F2=0

How to accomplish.
Thanks in advance.
I am using Excel 2007
Sheet1

BCDEF
11 or 0TRUE or FALSE
21TRUE 10

<colgroup><col style="FONT-WEIGHT: bold; WIDTH: 30px"><col style="WIDTH: 64px"><col style="WIDTH: 94px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"></colgroup><tbody>
</tbody>
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
959
Office Version
  1. 2007
Platform
  1. Windows

ADVERTISEMENT

The OP list of conditions doesn't mention 30 or 40

Sor.y

F2=10 IF B2=0 AND C2=TRUE
F2=20 IF B2=0 AND C2=FALSE
F2=30 IF B2=1 AND C2=TRUE
F2=40 IF B2=1 AND C2= FALSE
 

mikerickson

MrExcel MVP
Joined
Jan 15, 2007
Messages
23,980
Perhaps something like =CHOOSE(B2+2*C2+1, 20, 10, 40, 30)

You can adjust the return values to suit, if I got something wrong way 'round.
 
Last edited:

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
959
Office Version
  1. 2007
Platform
  1. Windows

ADVERTISEMENT

Perhaps something like =CHOOSE(B2+2*C2+1, 20, 10, 40, 30)

You can adjust the return values to suit, if I got something wrong way 'round.
Thanks mikerickson. IT WORKS
 

TAPS_MikeDion

Well-known Member
Joined
Aug 14, 2009
Messages
531
Office Version
  1. 2011
Platform
  1. MacOS
Just saw you had a response from Mike.

I was going to say try something like this:

=IFS
(AND(B2<>0,B2<>1),0,AND(B2=0,C2),10,AND(B2=0,C2=FALSE),20,AND(B2,C2),30,AND(B2,C2=FALSE),40)

 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,129,334
Messages
5,635,681
Members
416,872
Latest member
Ntsokolo Memani

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
Top