Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here's what I've hacked together that doesn't work:
Sub TryNow() Dim myCount As Integer Dim StartRow As Integer Dim myCell As Range myCount = 0 For Each myCell In Range("C2", Range("C30").End(xlUp)) StartRow = myCell.Row If myCell.Value < myCell(2, 1).Value Then StartRow = StartRow - myCount Selection.End(xlToLeft).Select Range(Selection, Selection.End(xlToRight)).Select Range(("A" & StartRow), ("Q" & StartRow + myCount)).Select With Selection.Interior .ColorIndex = 34 .Pattern = xlSolid End With myCount = 0 Else myCount = myCount + 1 End If Next myCell End Sub I plan to hack into it when this much gets working and add a condition of "If the First cell in column K of this set does not contain 'Yadda-Yadda'" to be the limiting component of the sets. The objective here is to find the rows of data for individuals who don't have the qualifying text in the First row, Column K, and then select all the rows for that individual and highlight them. A little help is needed once more -- all contributions gratefully received. -- Dave Temping with Staffmark in Rock Hill, SC |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Condition based copy/paste of range | Excel Programming | |||
Condition based copy/paste of range | Excel Programming | |||
Condition based copy/paste of range | Excel Programming | |||
Copy range based on condition | Excel Programming | |||
How to copy only some rows from range based on condition? | Excel Programming |