Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

get cell loc from range

  Asked By: Arnold    Date: Aug 25    Category: MS Office    Views: 795
  

My problem is that
I want to change the color of the maximum value

Here is the code which get the max value when it is given the range

Application.WorksheetFunction.Max(Range("b1:b5").Value)


What I want is to dynamically take the range and change the background color
I know selection.interior changes color.

So I need to get the max value and corresponding cell location to change its
bgcolor.

Please "cc" the reply as I am on Daily digest.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Topaz Ramirez     Answered On: Aug 25

You can use conditional formatting....................

 
Answer #2    Answered By: Angie Bennett     Answered On: Aug 25

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

=B1=MAX(B$1:B$5)

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

 
Didn't find what you were looking for? Find more on get cell loc from range Or get search suggestion and latest updates.




Tagged: