Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / December 2007

Tip: Looking for answers? Try searching our database.

Range Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
millwalll - 15 Dec 2007 23:24 GMT
Hi all I have some data that I have sorted then subtotal. Is there way I can
search all cells for the highest number then have the higest number cell
change colour?

Many thanks

I have been trying to think way to do this but not sure what would be best
so want some advice on best option...
Gary Keramidas - 15 Dec 2007 23:45 GMT
here's one way, there may be a better way. just change the ranges to your needs.

Sub highlight_largest()
     Dim rng As Range
     Dim rngfound As Range
     Dim ival As Double
     Set rng = Range("D14:f16")
     ival = WorksheetFunction.Max(rng)
     With rng
           Set rngfound = .Find(ival, LookIn:=xlValues)
           Range(rngfound.Address).Interior.ColorIndex = 3
     End With
End Sub
Signature


Gary

> Hi all I have some data that I have sorted then subtotal. Is there way I can
> search all cells for the highest number then have the higest number cell
[quoted text clipped - 4 lines]
> I have been trying to think way to do this but not sure what would be best
> so want some advice on best option...
Jim May - 16 Dec 2007 16:58 GMT
A conditional Formatting solution would include (sample range used)

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

FWIW,

> Hi all I have some data that I have sorted then subtotal. Is there way I can
> search all cells for the highest number then have the higest number cell
[quoted text clipped - 4 lines]
> I have been trying to think way to do this but not sure what would be best
> so want some advice on best option...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.