Using the OR function

Nanaia

Active Member
Joined
Jan 11, 2018
Messages
306
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I'm trying to add an OR function to an IF function. I want to say if Q2 or Q3 <12 then A5 otherwise use A4. I can get it to recognize when I say just one-like Q2, but can't get it to recognize both Q2 and Q3. I've got

=IF((OR(CSV!Q2<12)),....

Which works fine, but when I put

=IF((OR(CSV!Q2<12, CSV!R3<12))....

it doesn't reference A5, it still references A4 like it doesn't recognize CSV!R3 =<12...although it does occur to me I could be going about this wrong....

I can add more info if this isn't clear enough. I always have a heck of a time trying to explain Excel.

Regards,
Nanaia
"Do or do not, there is no try"~Yoda
 
Last edited:

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
I just saw I mis-typed the working formula. It's not =IF((OR(CSV!Q2<12)),....
It's actually =IF(CSV!Q3<12,(....
 
Upvote 0
Thanks. Does the A5 and A4 have to be right after? I have them in the middle of a line of JOINTEXT cells. I have A5 in the formula if the <12 check is true, and A4 if it's false.
 
Upvote 0
Thanks. Does the A5 and A4 have to be right after? I have them in the middle of a line of JOINTEXT cells. I have A5 in the formula if the <12 check is true, and A4 if it's false.

This is the formula I've got that isn't working
=IF(OR(CSV!Q2<12, CSV!R3<12),(REF!$A$2 & REF!B2 & REF!$A$3 & REF!D2 & REF!$A$5 & REF!$A$6 & REF!$A$7 & TEXT(REF!V2,"0.000") & REF!$A$8 & TEXT(REF!W2,"0.000") & REF!$A$9),(REF!$A$2 & REF!B2 & REF!$A$3 & REF!D2 & REF!$A$4 & REF!$A$6 & REF!$A$7 & TEXT(REF!V2,"0.000") & REF!$A$8 & TEXT(REF!W2,"0.000") & REF!$A$9))

This is the one I have with just one cell being checked instead of two, and it works
=IF(CSV!Q3<12,(REF!$A$2 & REF!B3 & REF!$A$3 & REF!D3 & REF!$A$5 & REF!$A$6 & REF!$A$7 & TEXT(REF!V3,"0.000") & REF!$A$8 & TEXT(REF!W3,"0.000") & REF!$A$9),(REF!$A$2 & REF!B3 & REF!$A$3 & REF!D3 & REF!$A$4 & REF!$A$6 & REF!$A$7 & TEXT(REF!V3,"0.000") & REF!$A$8 & TEXT(REF!W3,"0.000") & REF!$A$9))
 
Upvote 0
I got it. I was referencing Q2 and R3 and it should have been R2.
Thanks for your help.
Regards,
Nanaia
"Do or do not, there is no try"~Yoda
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,224
Members
452,620
Latest member
dsubash

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