check multiple conditions, several IF statements

dorado

New Member
Joined
Jul 20, 2014
Messages
3
Hi guys,

I need help for placing IF statements, ie have a scenario when two conditions are true, one of them, or neither of them. Simple example:

In cell A1 have number 14
In cell B1 have number 7

Numbers in cells are not fixed, can be chanced

Want to check whether A1 is greater than 5 and B1 are greater than -7. Have four scenarios

1. if both are TRUE then type "Yes"
2 if only A1 is TRUE then "A1 is greater"
3 if only B1 is TRUE then "B1 is greater"
4 if both are FALSE, then type "No"

thanks in advance

Regards,
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
=if(and(a1=14,b1=7),"yes",if(and(a1=14,b1<>7),"A1 is greater",if(and(a1<>14,b1=7),"B1 is greater","no")))

but if say a1 was 3 and b1 was 4 "a1 is greater" would not be true
 
Upvote 0
want to check every time i put values in A1 and B1 four possible scenarios, because they are not fixed, gave this numbers just for example
 
Upvote 0
Want to check whether A1 is greater than 5 and B1 are greater than -7. Have four scenarios
=if(and(a1 > 5,b1 > -7),"both",if(and(a1 > 5,b1 < 7),"A1 is greater than 5",if(and(a1 < =5,b1 > -7),"B1 is greater than -7","no")))
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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