Derivation of min and max values
Thanks Tom,
that was what I was looking for. I made the necessary changes for my case
and it worked instantly.
When this Sub found a Cell to be within the top 10. How can I dereive the
information in which Cell (Row / Col) this happened?
"Tom Ogilvy" wrote:
Since you don't seem enamored with conditional formatting and you posted in
programming, here is some code that might help.
Change Range("A1") to the upper left corner of your range.
Sub MarkTheCells()
Dim rng as Range, rng1 as Range
Dim l as Double, s as Double
Dim cell as Range
set rng = range("A1").Resize(96,64)
rng.interior.ColorIndex = xlNone
l = application.Large(rng,10)
s = application.Small(rng,10)
for each cell in rng
if isnumeric(cell) and _
not isempty(cell) and cell.Text < "" then
if cell.Value = l then
cell.interior.colorIndex = 5
elseif cell.Value<= s then
cell.Interior.colorIndex = 3
end if
end if
Next
End Sub
--
Regards,
Tom Ogilvy
"bandy2000" wrote in message
...
Hi
I have a data in a 96 by 64 field. Every cell in this field contains data.
How can I find the 10 biggest and smalles Values and then maybe select
them
or change the
Background Colour or do any other change of the font?
Thanks
|