hi there,
I have numbers in column a3 to a24.when i press a button i want the min number to turn red.any help would be great.
Last edited by giant; 03-18-2010 at 08:49 PM.
hi there,
I have numbers in column a3 to a24.when i press a button i want the min number to turn red.any help would be great.All the numbers are decimal values.Thanks
try
Code:Sub colour() Dim mycell As Double mycell = Application.WorksheetFunction.Min(Range("A3:A24")) For Each c In Range("A3:A24") If c = mycell Then c.Interior.ColorIndex = 3 Next c End Sub
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
martindwilson thank you works perfect.The numbers in the cells are constantly changing with each button click.So is it possible when i click again to make last red cell go back to normal and then next min number to color.
ok try
Code:Sub colour() Dim mycell As Double mycell = Application.WorksheetFunction.Min(Range("A3:A24")) For Each c In Range("A3:A24") c.Interior.ColorIndex = xlNone If c = mycell Then c.Interior.ColorIndex = 3 Next c End Sub
Last edited by martindwilson; 03-18-2010 at 06:00 PM.
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
martindwilson perfect thank you again.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks