Hi,
Can any one help me with a macro for looking down a cloumn of numbers(the numbers are real, eg 23.68), finding the minimum value and asigning a colour to that cell.
Thanks
Hi,
Can any one help me with a macro for looking down a cloumn of numbers(the numbers are real, eg 23.68), finding the minimum value and asigning a colour to that cell.
Thanks
You might not need a macro
You can use a formula in conditional formatting
Cell Value is equal to =MIN($D$4:$D$7)
for example
Martin
I was thinking the same thing Martin, but that doesn't work (well, at least not in Excel 97 ). All cells in the range were formatted based on the conditional format.
Here's a macro way of doing it
Sub Test()
MinNumber = 1E+18
For Each Cell In Selection
If IsNumeric(Cell) Then
If Cell < MinNumber Then
MinNumber = Cell
MinCellAddress = Cell.Address
End If
End If
Next Cell
If MinCellAddress <> "" Then
Range(MinCellAddress).Interior.ColorIndex = 3
End If
End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks