#1
|
|||
|
|||
Copy Row based on yellow highlighting.
I'm pulling my hair out cause I figured this out last year and now I can't find it.
I am given this spread sheet monthly that has conditional formatting applied already. Column B has various notes, and the ones with the word "faculty" are highlighted by conditional formatting. I need to copy the rows, where cell B is highlighted yellow, into sheet 2. Any help would be appreciated! |
#2
|
|||
|
|||
Hi
You could try using an Advanced Filter that copies discrete rows where a column contains the word "faculty" to a new sheet. Hope this helps. Good luck. Tony(OTPM) |
#3
|
|||
|
|||
Try this code:
Code:
Sub CopyRows() Dim i As Integer, nextrow As Long nextrow = Sheets("Sheet2").Range("A:A").End(xlUp).Row - 2 For i = 1 To 100 If Sheets("Sheet1").Cells(i, 2).Value = "faculty" Then Sheets("Sheet1").Cells(i, 2).EntireRow.Copy Sheets("Sheet2").Range("A" & nextrow) End If nextrow = nextrow + 1 Next i End Sub |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
highlighting | Donnathompson | Word | 4 | 08-07-2011 05:21 PM |
Line Highlighting | britmaniee | Excel | 1 | 06-29-2011 12:59 AM |
Easier highlighting? | atarei | Word | 0 | 08-27-2010 05:28 PM |
copy a file which does not have copy option | jkind | Word | 0 | 01-17-2010 09:25 AM |
Text Highlighting in Yellow ??? | mark4man | Publisher | 0 | 12-15-2005 06:46 PM |