Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hey!
I've gotten a request from a user to program a VB macro that moves all rows in a spreadsheet to the bottom if it contains a color (rgb(120,120,120)) I've been google'ing like nuts, but I've yet to find a solution that fits the task. As I've set it up right now its basicly something like this: ' Do a quick loop to find the bottom: Do iCounter = iCounter + 1 Loop Untill Cells(iCounter, 1).Value = "" ' Copy bottom interget into correct variable iBottom = iCounter ' Set iCounter to first row below header. iCounter = 2 Pseudocode for what I need: loop while iCounter < iBottom if currentRow.BackgroundColor = Grey swap currentRow with Row(iBottom) iBottom - 1 else iCounter + 1 end if loop end Can anyone help me out? -- Cato Larsen HelpDesk Monkey |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 Font Color and Background Color | Excel Discussion (Misc queries) | |||
Grey Background message | Excel Discussion (Misc queries) | |||
Deletion of rows according to background color | Excel Programming | |||
Identify rows with certain background color? | Excel Programming | |||
Background color for 50,000 odd-numbered rows | Excel Programming |