Hey all...
I'm trying to search for a specific string "CY" in a range of cells. Those cells will be within the range CT5 to EV5. I want to find the first cell in that row that has "CY" in it (only part of the contents of the cells) and then copy that cell and the next 19 in the row over to a different worksheet in the same workbook. I'm trying to a "with" and "find" routine that I've used elsewhere but I can't get it to work. Here is the code I'm trying to use. It doesn't even seem to start into that portion of the code so I wonder if I'm looking for a cell that has "CY" only in it.
dim c, a as variant
dim rng as range
With Worksheets("IHS_Data_Dump").Range("CT5:EV5")
Set c = .Find("CY", LookIn:=xlValues)
If Not c Is Nothing Then
rng = c.Address
For a = 0 To 18
Worksheets("Master Program List").Cells(3, 25 + a) = rng.Offset(0, a)
Next a
End If
End With
Thanks.
Bookmarks