Saturday, September 06, 2014
Tuesday, June 10, 2014
Monday, April 07, 2014
Tuesday, April 01, 2014
Friday, February 28, 2014
Monday, February 03, 2014
Thursday, January 09, 2014
Adding Dynamic Column to Excel
Adding Dynamic Column to Excel
Following function will add one column at location D for all the sheets in opened excel document.
Sub AddColumnUPdateHeader()
For X = 1 To Worksheets.Count
Sheets(X).Select
Columns("D:D").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Next X
End Sub
Following function will add one column at location D for all the sheets in opened excel document.
Sub AddColumnUPdateHeader()
For X = 1 To Worksheets.Count
Sheets(X).Select
Columns("D:D").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Next X
End Sub
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
Sub ReadNames()
Range("B2") = Worksheets.Count
For X = 1 To Worksheets.Count
Range("C" & X).Value = Worksheets(X).Name
Next X
End Sub
Subscribe to:
Posts (Atom)