Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a spreadsheet of 30 columns and 5000 rows. The first row is a label row.
I applied an autofilter (like greater than 20) to one of the columns and am showing the visible rows that satisfy the autofiltered column. I wish to color the maximum and minimum values in each of the visible autofiltered columns The code below takes a very loong time to complete AND it somehow increases the rows in the spreadsheet to the maximum 65000. What am I doing wrong? Thanks for any help. my code snippet is: SS = ActiveSheet.Name Set curwk = Sheets(SS) With curwk 'Reset All Interior cells to standard color index .Cells.Select Selection.Interior.ColorIndex = xlNone 'Cells.Deselect .Range("A2").Select For ii = 2 To LastCol Set rng = .Columns(ii).SpecialCells(xlCellTypeVisible) MaxVal = Application.Max(rng) MinVal = Application.Min(rng) For Each myCell In rng CellVal = myCell.Value If IsNumeric(CellVal) = True Then If CellVal = MaxVal Then myCell.Interior.ColorIndex = 4 If CellVal = MinVal Then myCell.Interior.ColorIndex = 6 End If Next Next ii End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula for determining if two date columns fall within specific date range | Excel Worksheet Functions | |||
Referencing a range of columns and rows with the IF function | Excel Worksheet Functions | |||
Columns | Excel Discussion (Misc queries) | |||
average of visible cells in a filtered range | Excel Worksheet Functions | |||
extract data from a range of cells in rows or columns when a date. | Excel Worksheet Functions |