Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to select a range starting from the cell above the activecell and
continuing upward and stopping when it finds the first cell that contains a fill color. In other words, I need to select the first group of cells above the active cell that all have "no fill" as their fill color. I then want to take that range and plug it into the =COUNTA() formula for the activecell. But first I just want to find the range, I'll worry about the formula later. Here's what I've written so far which doesn't seem to be working: Private Sub CommandButton1_Click() Dim StartCell As Range Set StartCell = ActiveCell Do While ActiveCell.Interior.ColorIndex = xlColorIndexNone Range(StartCell & ":" & ActiveCell.Offset(-1, 0)).Select Loop End Sub Anybody have an idea on how to do this? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I select pivot table row totals to fill color them | Charts and Charting in Excel | |||
Fill color based on RGB | Excel Programming | |||
Is there a way to count cells in a range based on fill color? | Excel Worksheet Functions | |||
change fill color of a range of cells based on color of a cell? | Excel Programming | |||
Select or Filter by Fill Color | Excel Worksheet Functions |