IF OR Function

TexasCPA

New Member
Joined
Nov 27, 2024
Messages
7
Office Version
  1. 2019
Platform
  1. MacOS
=IF((B23=1.2,H23>0,"CR"),IF(B23=1.2,H23<0,"CD"))

In Cell L23: I want CR or CD

The formula says to me, If B23=1.2 and the value in H23 is > 0..00, the value in L23 should be “CR" and vice-versa.

The formula does not work. Please correct the formula

Thanks
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
The logic you are looking for is this:

=IF( logic question, true result, false result)

To perform AND / OR operations, you use these within the logic portion:

AND(A1=1, A2=0)

OR(A1=1, A1=0)

Your formula should look something like this:

=IF(AND(B23=1.2,H23>0),"CR",IF(AND(B23=1.2,H23<0),"CD",""))

Logic question 1
True result 1
Logic question 2 - note logic question 2 is within the FALSE result of the first IF function.
True result 2
False result 2


You are also trying to put the result for each logic question within the logic question itself instead of in the TRUE/FALSE result sections.
 
Upvote 0
The logic you are looking for is this:

=IF( logic question, true result, false result)

To perform AND / OR operations, you use these within the logic portion:

AND(A1=1, A2=0)

OR(A1=1, A1=0)

Your formula should look something like this:

=IF(AND(B23=1.2,H23>0),"CR",IF(AND(B23=1.2,H23<0),"CD",""))

Logic question 1
True result 1
Logic question 2 - note logic question 2 is within the FALSE result of the first IF function.
True result 2
False result 2


You are also trying to put the result for each logic question within the logic question itself instead of in the TRUE/FALSE result sections.
Thanks for your help-that resovlved my issue. Happy Thanksgiving from Texas
 
Upvote 0
I think you can do that with one OR:

=IF(OR(B23<>1.2,H23=0),"",IF(H23>0,"CR","CD"))
 
Upvote 0
Solution
Don't think you need OR.
Excel Formula:
=IF(B23=1.2,IF(H23>0,"CR","CD"),"")
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,912
Members
452,949
Latest member
beartooth91

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