Below is the code that I'm running, I'm not too sure if I can get what I want.
But strangely, the code is taking too long to run.
I was waiting for it for an hour.
So I figured there must be some errors in the code.
Can anybody shed some light on this?
Set x = Workbooks.Open("C:\Users\Desktop\testing.xlsx")
For Each ws In x.Worksheets
If ws.Name <> "Master" Then
lrow = ws.Cells(Rows.Count, "A").End(xlUp).Row
Set rng = ws.Range(Cells(1, 1), Cells(lrow, 1))
For Each Acell In rng
If (Acell.Value = "Sum") Then
Acell.Offset(-1, 0).EntireRow.Insert
End If
Next Acell
End If
Next ws
I'm looking for that "Sum" word in Col A, for every sheets in workbook except "master" sheet.