conditional formatting.

  • Thread starter Thread starter Mike G
  • Start date Start date
M

Mike G

I have a row of numbers that look like this 3.46 3.41 3.46 3.48 3.50 3.51
3.53 3.54 3.57 3.61.
The first number (left most) is a variable number, the remainder are fixed.
What I want to do is input a number, have it match a number in the
remainder of the row. If it is an exact match, then select that column, if
it is not an exact match then select the next lowest number. i.e. If the
input number is 3.45, I want it to select 3.41. Here is the kicker, when
the matching number is selected, I want to reverse the background and font
color. Instead of white background with black text, I want a black
background with white text. TIA Mike
 
I have a row of numbers that look like this 3.46 3.41 3.46 3.48 3.50 3.51
3.53 3.54 3.57 3.61.
The first number (left most) is a variable number, the remainder are fixed.
What I want to do is input a number, have it match a number in the
remainder of the row. If it is an exact match, then select that column, if
it is not an exact match then select the next lowest number. i.e. If the
input number is 3.45, I want it to select 3.41. Here is the kicker, when
the matching number is selected, I want to reverse the background and font
color. Instead of white background with black text, I want a black
background with white text. TIA Mike

You cannot "select" a cell or a column with a formula.

You can conditionally format a cell to do what you want. For example, if your
row is in A1:J1, then select B1 and:

Format/Conditional Formatting/Formula Is: =MATCH($A$1,$B$1:$J$1)=COLUMN()-1
Format/Font/Color White
/Patterns/Cell Shading Black

OK
OK

Finally, select B1 with the format painter and drag it across to J1.


--ron
 
Thanks Ron....worked exactly like I wanted. I probably mis-used the word
'select" I meant to format the appropriate cell. Tx...

I'm glad it worked for you.

Best wishes,

--ron
 
Back
Top