Find the smallest number in a column and change it to red

C

C. Holstein

I have a column of whole numbers. I would like to find the smallest number in the column of numbers and change it's font color to red. How can I do this? Thanks for the help.
 
D

Dan E

C.,

Let's say you wanted to do this for column A...

Select column A and from the menu choose Format -> Conditional Formatting
For Condition 1:
Cell Value Is Equal To =MIN($A:$A)
Set your format (ie. Red)
Hit OK

If it doesn't work at first go back in and make sure it hasn't put your condition in
quotes [ie ="=MIN($A:$A)"] if it has just delete the quotes and hit OK

Dan E

C. Holstein said:
I have a column of whole numbers. I would like to find the smallest number in the column of numbers and change it's font color to
red. How can I do this? Thanks for the help.
 
C

Chuck Holstein

Thanks Dan E. your solution, it worked perfectly. I have one more
question.
I have multiple columns of whole numbers, ie:

A B C D
4 5 4 3
5 5 4 4
6 6 5 4
7 4 3 3
6 5 4 4

I would like to find the smallest number in each column and change it to
red, but only if it is the only small number in the column, like 4 in
column A, 4 in column B, 3 in column D and ignore the two 3's in column
D. How can I do this in an Excel worksheet? Again thanks so much for
your help.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
D

Dan E

Chuck,

Let's say your example was in A1:D6 (including headers) so the
data is in A2:D6.

Select the range (A2:D6) and choose Format -> Conditional
Formatting. Under condition 1 choose Formula Is and in the
formula area enter:
=AND(A2=MIN(A$2:A$6),COUNTIF(A$2:A$6,MIN(A$2:A$6))=1)
Hit OK

Dan E
 
C

Chuck Holstein

Thanks Dan E. for your kind help. Your solution worked fine.

I have a worksheet that fills columns of cells with whole numbers using
the VLOOKUP command. Your solution works fine unless one of the cell
contains the #N/A error code which occurs when the VLOOKUP can not find
valid information. How can I get your solution to work while ignoring
these error codes? Thanks for your help.
Chuck



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
D

Dan E

Chuck,

Here's a revised formula that should do the trick. It ignores #N/A's

=AND(A2=MIN(IF(ISNA(A$2:A$6),"",A$2:A$6)),COUNTIF(A$2:A$6,MIN(A$2:A$6))=1)

Dan E
 
D

Dan E

Cuck,

Upon further testing that previous post should be ignored it fails if their
are more than 1 #N/A's, This one is the right one...

=AND(A2=MIN(IF(ISNA(A$2:A$6),"",A$2:A$6)),COUNTIF(A$2:A$6,MIN(IF(ISNA(A$2:A$6),"",A$2:A$6)))=1)

Dan E
 
C

Chuck Holstein

Dan E.
It seems like the conditional format isn't working this time.
Would it be possible for me to send you a copy of my workbook by email.
I would appreciate it if you would check it out to see where I went
wrong. Write to me and I will forward it on. Thanks again for your
time and help.

Chuck



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top