Tuesday, January 07, 2014

Macro for Excel to get Count and Names of Sheets of excel documents

Following routing will update Cell B2 with count of total numbers of sheet and Update Column C with names of sheets.

Sub ReadNames()

Range("B2") = Worksheets.Count

For X = 1 To Worksheets.Count

Range("C" & X).Value = Worksheets(X).Name

Next X

End Sub

No comments: