Adding multiple arguments in conditional formula

steve89

Board Regular
Joined
Oct 4, 2015
Messages
152
hi all i need help with a conditional formula.

I want for a example =$C$10:$AG$106="nbt/l"=+"nbt/l/m" to change to a specific color if either of the options are used in the drop down selection.

Now currently i only have =$C$10:$AG$106="nbt/l" which turn the cell purple but i want to use multiple arguments what am i doing wrong? thanks
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
To check for multiple conditions, you either want to use AND (if both conditions must be met) or OR (if only one condition must be met).

For example, you check to see if an entry in cell A1 is either "Joe" or "Steve", it would look something like:
Code:
=OR(A1="Joe",A1="Steve")
 
Upvote 0
Doesnt work it highlights every cell from the point where i enter "steve" so if i entered steve on g50 it highlights anything before it too. using what i provided as a template is what i'm looking for:

=$C$10:$AG$106="nbt/l","nbt/l/m" -- the cell needs to change colors if either of those options appear but just that ONE CELL.

thank you so much
 
Upvote 0
OK, so lets see if I understand you question correctly.
In the range C10:AG106, you want to highlight any cell that equals "nbt/l" or "nbt/l/m".
Is that correct?

If so, then do the following:
- Select the entire range C10:AG106
- Go to Conditional Formatting and enter the following CF formula:
Code:
=OR(C10="nbt/l",C10="nbt/l/m")
- Choose your highlighting color

This should do what you want. They keys are the following:
- Select the ENTIRE range you want to apply the rule to
- Write the formula as it pertains to the very first cell in your selected range. If you use Absolute/Relative Referencing correctly, Excel will automatically adjust the formula for all the other cells in your range.
 
Upvote 0
but its not c10 only it needs to find it if nbt/l is entered anywhere from c10-ag106
I repeat what I said.
- Write the formula as it pertains to the very first cell in your selected range. If you use Absolute/Relative Referencing correctly, Excel will automatically adjust the formula for all the other cells in your range.
If you had used the formula:
Code:
=OR($C$10="nbt/l",$C$10="nbt/l/m")
it would compare EVERY cell in your range to C10.
Notice how my formula doesn't have the dollar signs - that allows the formula to "float" as it moves across the range (whereas dollar signs lock it down to that particular cell).

Try it, and you will see.

If you do not fully understand Relative vs. Absolute Range References, read this (it will come in very handy): http://www.excel-easy.com/functions/cell-references.html
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,189
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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