I have the following macro that counts worksheets and inserts worksheet names in Column A starting at row 4.
Sub() InsertNames
For i = 1 To Worksheets.Count
ActiveSheet.Cells(i + 3, 1).Value = Worksheets(i).Name
Next i
End Sub
I have two worksheets that I do not want to appear on the listing. What do I need to do with the macro so those names do not appear in the listing?
Using Excel 2007
Thanks
Sub() InsertNames
For i = 1 To Worksheets.Count
ActiveSheet.Cells(i + 3, 1).Value = Worksheets(i).Name
Next i
End Sub
I have two worksheets that I do not want to appear on the listing. What do I need to do with the macro so those names do not appear in the listing?
Using Excel 2007
Thanks