If(AND with multiply

tiredofit

Well-known Member
Joined
Apr 11, 2013
Messages
1,825
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I am familiar with this type of IF(AND

Code:
=IF(AND(G11=10,H11=20),"Yes","No")

Can someone please explain what this is doing?

Code:
=IF(AND(A1="a")*(B1=10)*(C1=30),D1,E50)

What is the significance of the multiply?

Thanks
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
You can use multiply instead of AND to do the same thing as AND. It makes use of the fact that TRUE=1 and FALSE=0. So, 1*1*1=1, which is TRUE.
Anything else would be multiplied by 0, which would return 0 (or FALSE).

However, that second one is constructed incorrectly (or at least inefficiently). There is no point in using AND with just one condition.
If you wanted to do it with multiply instead of AND, it should look like:
Code:
=IF((A1="a")*(B1=10)*(C1=30),D1,E50)
which would give you the same result as:
Code:
=IF(AND(A1="a",B1=10,C1=30),D1,E50)

So AND and multiple are really just two ways of doing the same thing.
 
Last edited:
Upvote 0
Thanks.

I was aware of the significance of the * in a SUMRODUCT formula but not in IF(AND
 
Upvote 0
It essentially works the same way.
Just realize that TRUE=1 and FALSE=0.

So
(A1="a")*(B1=10)*(C1=30)
is the same as:
AND(A1="a",B1=10,C1=30)

Which one you use is a matter of preference.
 
Upvote 0

Forum statistics

Threads
1,213,521
Messages
6,114,104
Members
448,548
Latest member
harryls

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