I know very little in macros and I am struggling with this code. It would be great if any one help me in this.
I have a filtered data in an excel spread sheet on 1 of the columns, now I need to create a loop on the visible/filtered data so that I can search for a value in one of the columns and I can get the result. Here is my code.
Dim Rngs As Range Dim rw As Range Set Rngs = Range("A2", Range("A65536").End(xlUp)).SpecialCells(xlCellTypeVisible).Rows For Each rw In Rngs schText1 = ThisWorkbook.Sheets("Log").Range("M" & rw.Row + 1) If InStr(schText1, "Expected record count") Then intPos1 = InStr(1, schText1, ":") ep.Range("D" & Sheet6Row) = Right(schText, (Len(schText) - intPos1)) End If Next rw
the issue I am facing is , I have 17 rows filtered out of 49 rows. the above for .. each .. is looping only twice. It is not searching the 17 rows.
MODERATOR NOTE - please remember to use code tags in future as per forum rules.