W
Wayne Burritt
Hi--I'd like to program a macro (or two) that does the following things:
First, I need to take a range of data (source data) in a column (C2:C39, see
below) and ADD it eactly as it is to another worksheet (archive). The
problem is I want the macro to add the data to a new column in the archive
worksheet. The macro I made -- which is below -- keeps adding it in the
same place in the archive worksheet. Plus, I want it to find the archive
worksheet and not the "next" one. There's also some formatting stuff, too.
See my attempt in Macro 1 below.
Second, I need another macro to copy the last entry in the archive worksheet
to another worksheet (archive horizontal) and then do some formatting. See
my attempt in Macro 2 below.
Thanks for any help! Wayne
MACRO 1:
Sub Trade_review()
'
' Trade_review Macro
' Macro recorded 8/14/2003 by WBurritt
'
'
Range("C2:C39").Select
Selection.Copy
ActiveSheet.Next.Select
Range("BC2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("BB40:BB58").Select
Application.CutCopyMode = False
Selection.Copy
Range("BC40").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.ClearContents
Range("BC2").Select
End Sub
MACRO 2:
Sub Trade_Review_2()
'
' Trade_Review_2 Macro
' Macro recorded 8/14/2003 by WBurritt
'
'
Range("BC2:BC58").Select
Selection.Copy
Sheets("Rev Rpt (H)").Select
Range("B52").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Sheets("Rev Rpt (V)").Select
Range("BC2").Select
End Sub
First, I need to take a range of data (source data) in a column (C2:C39, see
below) and ADD it eactly as it is to another worksheet (archive). The
problem is I want the macro to add the data to a new column in the archive
worksheet. The macro I made -- which is below -- keeps adding it in the
same place in the archive worksheet. Plus, I want it to find the archive
worksheet and not the "next" one. There's also some formatting stuff, too.
See my attempt in Macro 1 below.
Second, I need another macro to copy the last entry in the archive worksheet
to another worksheet (archive horizontal) and then do some formatting. See
my attempt in Macro 2 below.
Thanks for any help! Wayne
MACRO 1:
Sub Trade_review()
'
' Trade_review Macro
' Macro recorded 8/14/2003 by WBurritt
'
'
Range("C2:C39").Select
Selection.Copy
ActiveSheet.Next.Select
Range("BC2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("BB40:BB58").Select
Application.CutCopyMode = False
Selection.Copy
Range("BC40").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.ClearContents
Range("BC2").Select
End Sub
MACRO 2:
Sub Trade_Review_2()
'
' Trade_Review_2 Macro
' Macro recorded 8/14/2003 by WBurritt
'
'
Range("BC2:BC58").Select
Selection.Copy
Sheets("Rev Rpt (H)").Select
Range("B52").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Sheets("Rev Rpt (V)").Select
Range("BC2").Select
End Sub