use of OR in a formula (not as in and/or type meaning)

rmccafferty

Board Regular
Joined
Jul 16, 2009
Messages
60
I am faced with an extremely complex workbook with formulas that contain code I have not used or seen before. If anyone can explain what OR means in the following, I would be very grateful. I do not see how the OR could mean literally, or, and it does not refer to a worksheet column of OR:

'=INT(0.5+RC[1]/12)+IF(OR(Input!R[16]C="A", Input!R[16]C="SA", Input!R[16]C="Q", Input!R[16]C="BM"),0.001,0)+IF(OR(Input!R[16]C[2]="C",Input!R[16]C[2]="BC",Input!R[16]C[2]="RC"),0.002,0)+IF(OR(Input!R[16]C[2]="B",Input!R[16]C[2]="BC",Input!R[16]C[2]="BRET"),0.004,0)+IF(OR(Input!R[16]C[2]="R",Input!R[16]C[2]="RC",Input!R[16]C[2]="RRET"),0.008,0)

The above is all one line in the Excel cell, but for whatever reason did a couple of line breaks when I pasted it above. I added the leading apostrophe in the first line. There are innumerable cells within many tabs of this workbook with these designations in them.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
I am faced with an extremely complex workbook with formulas that contain code I have not used or seen before. If anyone can explain what OR means in the following, I would be very grateful. I do not see how the OR could mean literally, or, and it does not refer to a worksheet column of OR:

'=INT(0.5+RC[1]/12)+IF(OR(Input!R[16]C="A", Input!R[16]C="SA", Input!R[16]C="Q", Input!R[16]C="BM"),0.001,0)+IF(OR(Input!R[16]C[2]="C",Input!R[16]C[2]="BC",Input!R[16]C[2]="RC"),0.002,0)+IF(OR(Input!R[16]C[2]="B",Input!R[16]C[2]="BC",Input!R[16]C[2]="BRET"),0.004,0)+IF(OR(Input!R[16]C[2]="R",Input!R[16]C[2]="RC",Input!R[16]C[2]="RRET"),0.008,0)

The above is all one line in the Excel cell, but for whatever reason did a couple of line breaks when I pasted it above. I added the leading apostrophe in the first line. There are innumerable cells within many tabs of this workbook with these designations in them.
The OR does mean literally or.

The formula is using R1C1 references.

IF(OR(Input!R[16]C="A", Input!R[16]C="SA", Input!R[16]C="Q", Input!R[16]C="BM"),
Which means:

IF OR cell reference ="A", OR cell reference ="SA", OR cell reference ="Q", OR cell reference ="BM".
 
Upvote 0

Forum statistics

Threads
1,224,593
Messages
6,179,791
Members
452,942
Latest member
VijayNewtoExcel

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