" If " & " And " query

avinashraste

Board Regular
Joined
Mar 12, 2008
Messages
167
Dear All,

Is this multiple if and query possible :

If A2 is > 1000 and E2 > 5 then
D2
else C2

and

If A2 is <1000 and >100 and E2 > 2 then
D2
else C2

and

if A2 is < 100 and E2 > 0.5 then
D2
else C2

Can we make this formula for excel ?

Thanks & Regards

Avinash Raste
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Try something like this...
Code:
=IF(OR(AND(A2>1000,E2>5), 
         AND(A2<1000,A2>100,E2>2), 
           AND(A2<100,E2>0.5)),C2,"")
 
Upvote 0
Hi
Thanks for the reply friend,

I have tried and pasted the formula but it gave no result. The cell remains blank.

Avinash Raste
 
Upvote 0
hi,

I'm sorry, my mistake. It does work but only thing is that it does not give result if the E2 is < 5 or less than 2 or less than 0.5, i mean less than condition is not proper...

please help

Avinash Raste
 
Upvote 0
I'm sorry, my mistake. It does work but only thing is that it does not give result if the E2 is < 5 or less than 2 or less than 0.5, i mean less than condition is not proper...

I don't follow what criteria you now want. Originally you had asked for E2 > 5 now you want E2 < 5 ?

If you look at the structure if the formula, you should be able to modify it yourself.

=IF(OR(AND(A2>1000,E2>5),
AND(A2<1000,A2>100,E2>2),
AND(A2<100,E2>0.5)),C2,"")

The OR test if any one of the AND statements is true then the result is C2

The ANDs test if the all the criteria within () is true...
AND(A2>1000, E2>5) 'Both have to be true
OR
AND(A2<1000, A2>100, E2>2) 'All three have to be true
OR
AND(A2<100, E2>0.5) 'Both have to be true
 
Upvote 0
Hello,

Thanks for the reply. I'm trying the way you have suggested. I will come back soon to reply. Thanks again friend.

Avinash Raste
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

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