Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to look at all of the rows in column A and determine if the
color = "6" and if the color index is 6 then copy that entire row to another sheet. I believe I have code that will check for the color but I'm not sure how to then copy the row to the other sheet. Also, I either need to amend the destination sheet or replace the contents of the sheet all together. I can not have duplicates on the dest sheet. Here is what I have so far: Sub testme() Dim myCell As Range Dim newWks As Worksheet Dim curWks As Worksheet Dim LastRow As Long Dim LastCol As Long Dim iRow As Long Dim iCol As Long Dim oRow As Long Dim rng As Range Dim myColorIndex As Long Set curWks = Worksheets("2006 Scheduled Activities") Set newWks = Worksheets("sheet3") myColorIndex = 6 oRow = 1 With curWks With .UsedRange LastRow = .Rows(.Rows.Count).Row End With For iRow = 1 To LastRow If .Cells(iRow, "A").Interior.ColorIndex = myColorIndex Then ' 'need the code that would go here to copy the entire row to sheet3 is the row matches color index 6 ' End If 'End If Next iRow End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change tab color based on current color of a cell | Excel Discussion (Misc queries) | |||
change fill color of a range of cells based on color of a cell? | Excel Programming | |||
Copy Color Formats Based On Column Date Values | Excel Discussion (Misc queries) | |||
copy and paste to another sheet based in cell color | Excel Programming | |||
Browse Forms Controls and change TextBox color based on cell color | Excel Programming |