Using an OR in an IF Function

bmartin2

New Member
Joined
Aug 16, 2010
Messages
7
I'll try to phrase my question as clearly as I can so that you wonderful people can help me! ;)

I have Column A and Column B with Data, Column C is where I want to do the Formula and Column D is where I have the labels.

Column D is where we label a certain piece of business as registered, hold, order, walked, passed or moved.

I want to have column C calculate A/B if Column D is labeled as registered, order or hold. If Column D isn't labeled as registered, order or hold, I want a zero in Column C.

When I try to add the OR into the formula, I'm getting errors out the wazoo.

So what should my formula be?


As a sub question, if the formula includes "registered" will it pick up "Registered" or "REGISTERED" or is it caps sensitive?

Thank you so much!
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
I want to have column C calculate A/B if Column D is labeled as registered, order or hold. If Column D isn't labeled as registered, order or hold, I want a zero in Column C.

Should be
Code:
=if(or(d1="registered",d1="order",d1="hold"),a1/b1,0)

cant test it right now because i'm not at a computer with excel however the above is assuming that your data starts in row 1.
 
Upvote 0

Forum statistics

Threads
1,213,486
Messages
6,113,932
Members
448,533
Latest member
thietbibeboiwasaco

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