Hello,
Every month I create a YTD statement and since this is done monthly I need to copy the formulas from on month to the next while hard-coding the prior-month. I have already created a macro that works exactly as I need it to, but what I need to be able to do now is add a portion to the macro to run on specific tabs within my workbook. Can someone please tell me what I need to add to the below code in order to have it work off the listing I have already created on my input tab? FYI "John Smith" is a sample of what a name would be in my input tab listing.
Sub NewUpdate()
'
' NewUpdate Macro
'
'
ActiveCell.Select
Sheets("John Smith").Select
ActiveCell.Range("A1:T1").Select
Application.CutCopyMode = False
Selection.Copy
ActiveCell.Offset(2, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveCell.Offset(-2, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("EELookup").Select
ActiveCell.Select
Application.CutCopyMode = False
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End Sub
Every month I create a YTD statement and since this is done monthly I need to copy the formulas from on month to the next while hard-coding the prior-month. I have already created a macro that works exactly as I need it to, but what I need to be able to do now is add a portion to the macro to run on specific tabs within my workbook. Can someone please tell me what I need to add to the below code in order to have it work off the listing I have already created on my input tab? FYI "John Smith" is a sample of what a name would be in my input tab listing.
Sub NewUpdate()
'
' NewUpdate Macro
'
'
ActiveCell.Select
Sheets("John Smith").Select
ActiveCell.Range("A1:T1").Select
Application.CutCopyMode = False
Selection.Copy
ActiveCell.Offset(2, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveCell.Offset(-2, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("EELookup").Select
ActiveCell.Select
Application.CutCopyMode = False
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End Sub