Hello All, Sorry if this seems obvious to some of you but I have some VBA that lists all cell details in Column A. What changes do I need to do to it to make an exception of Row 1? The code I use is here;
Many thanks for your assistance.
Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
Sheets("Working sheet").Rows("2:65536").Clear
For Each Sheet In Sheets
If Sheet.Name <> "Index" And Sheet.Name <> "Working sheet" Then
For N = 1 To Sheet.Cells(65536, 1).End(x1Up).Row
If Trim(Sheet.Cells(N, 1)) <> "" Then
Sheets("Working sheet").Cells(65536, 1).End(xlUp).Offset(1, 0) = Sheet.Cells(N, 1)
Sheets("Working sheet").Cells(65536, 1).End(xlUp).Offset(0, 1) = Sheet.Name
Sheets("Working sheet").Cells(65536, 1).End(xlUp).Offset(0, 2) = N
End If
Next N
End If
Next Sheet
Sheets("Working sheet").Cells(1, 1).CurrentRegion.Sort Key1:=Sheets("Working sheet").Cells(2, 1), Header:=xlYes
Application.EnableEvents = True
End Sub
Many thanks for your assistance.