Help with a macro
Sub DAILY()
Dim LastRow As Long
With Sheets("Running total")
.Cells(.Rows.Count, "B").End(xlUp).Row
.Cells(LastRow, "B").Resize(1, 28).Copy .Cells(LastRow + 1, "B")
.Cells(LastRow + 1, "B").Value = .Cells(LastRow + 1, "B").Value
End With
With Sheets("Pending running total")
.Cells(.Rows.Count, "B").End(xlUp).Row
.Cells(LastRow, "B").Resize(1, 14).Copy .Cells(LastRow + 1, "B")
.Cells(LastRow + 1, "B").Value = .Cells(LastRow + 1, "B").Value
End With
End Sub
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"Brad" wrote in message
...
The macro as recorded.
Sub DAILY()
'
' Keyboard Shortcut: Ctrl+Shift+D
'
Sheets("Running total").Select
Range("B133:AE133").Select
Selection.Copy
Range("B134").Select
ActiveSheet.Paste
Range("B133").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
Sheets("Pending running total").Select
Range("B105:O105").Select
Application.CutCopyMode = False
Selection.Copy
Range("B106").Select
ActiveSheet.Paste
Range("B105").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
End Sub
Each day the row portion of the cell address will change by one and I
would
like to not make the reference absolute
Do I replace?
Range("B133:AE133").Select
with
Range(Range("A1"), Cells(Rows.Count, "A").End(xlUp)).Select
I don't think so because this just finds the last row correct? In
addition,
I'm missing the multiple columns (to AE) (and I'm starting in "A" rather
than
"B")
|