View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Brad Brad is offline
external usenet poster
 
Posts: 846
Default Help with a macro

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")