Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Highlight a Cell, VBA or CF?

  Asked By: Rainhard    Date: Jan 17    Category: MS Office    Views: 897
  

I have a range of data and I would like to highlight the minimum value in
this range (minimum value different from zero).

Ex:



12, 0, 5, 1, 0, 10 : the minimum in this range, different from zero is 1.



Is this possible by Conditional Formatting or should I use VBA?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Orville Rodriguez     Answered On: Jan 17

You dont need VBA for this. Your range  is in B1:B6. Conditional
formatting of cell  B1: choose
'Formula is:' and enter this:

=B1=SMALL($B$1:$B$6,COUNTIF($B$1:$B$6,"<=0")+1)

and set how you want it to be highlighted. Then using the Format
Painter icon on the Standard Toolbar, copy to B2:B6.

This excludes negative numbers as well as zeroes.

 
Didn't find what you were looking for? Find more on Highlight a Cell, VBA or CF? Or get search suggestion and latest updates.




Tagged: