mplees
Active Member
- Joined
- Feb 6, 2006
- Messages
- 351
Hi,
I've been using the following code to highlight specific rows in my workbook - if a cell in column K contains 1, then the cell is highlighted in red
...which seems to work fine. What I need to do now however, is to copy each row that contains 1 in column K to another sheet in the workbook, & then clear the original contents. e.g if my data is on row 8, copy the data from A8:K8 to the next empty row on Sheet 2. I've been playing around, but haven't been able to find a way to do this correctly - can anyone assist?
Regards,
Mark
I've been using the following code to highlight specific rows in my workbook - if a cell in column K contains 1, then the cell is highlighted in red
Code:
Dim CurCell as Range
Dim lRows as long
lRows = ActiveSheet.Rows.Count
For Each CurCell in ActiveSheet.Range("K:K")
If CurCell.Value = 1 Then CurCell.Interior.ColorIndex = 3
Next CurCell
...which seems to work fine. What I need to do now however, is to copy each row that contains 1 in column K to another sheet in the workbook, & then clear the original contents. e.g if my data is on row 8, copy the data from A8:K8 to the next empty row on Sheet 2. I've been playing around, but haven't been able to find a way to do this correctly - can anyone assist?
Regards,
Mark