user1432890
user1432890

Reputation: 25

Format multiple rows of Excel Cells if they are not between a range

I have a low number and a high number in columns A and B respectively. In columns C thru Z I have numbers.

This pattern repeats down many rows with a different low and high for each row.

I'm trying to conditionally format any cell in columns C thru Z if they fall outside of the two numbers...and then move to the next row and do the same with the new low and high values.

I tried using the conditional formatting feature in Excel 2010, but it didn't seem to work when I tried to use anchors for the low and high columns. Is there a way to do this with VBA?

Upvotes: 0

Views: 1152

Answers (1)

barry houdini
barry houdini

Reputation: 46401

You shouldn't need VBA - try this:

Select columns C to Z

Conditional Formatting > New Rule > Use a formula to determine which cells to format > In the formula box type this formula

=AND(C1<>"",OR(C1<$A1,C1>$B1))

select required format > OK

That should be all you require - make sure formula is exactly as above including $ signs

Upvotes: 3

Related Questions