Combining two IF statements

vostroxe

New Member
Joined
Jul 13, 2018
Messages
29
Code:
=IF(AND(C1<>"B",B1<0),50,40)

Code:
=IF(AND(C1="B",B1<0),40,50)

Urgently need guide on how to combine above two IF statements into one.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
i think it's like
=IF(testA, result if A is true, result if A is false)
=IF(testB, result if B is true, result if B is false)
=IF(testA, result if A is true, IF(testB, result if B is true, result if A and B are false))

i'm cant tell if your code has a result for if neither is true but think combining your code might look like

Code:
=IF(AND(C1<>"B",B1<0),50,IF(AND(C1="B",B1<0),40,"result if neither is true"))

sorry if i've made things more confusing. i might be wrong about some stuff. i'm on excel 2007 but i think 365 has a the function =IFS() which might be more helpful but i dont know much about it
 
Upvote 0
Hi,

=IF(B1<0,IF(C1=“B”,40,50),IF(C1=“B”,50,40))

Did this on my phone, do not copy and paste, re-type the formula in Excel.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

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