Increase row value selection by one daily

RyanMG

New Member
Joined
Jan 20, 2011
Messages
1
I'm very new to vba and have recorded a macro that allows me to perform some daily updates to an excel report file. The file is updated daily and new data is added.
What I need the code to do is increase by one row daily so it picks up the next line of data.
The row select is where it says: 'Range("G1808:GE1808").'
So tomorrow I need it to copy and paste as values Range("H1808:HE1808").'

Hope you can help!

This is what the vba code looks like:

Sub BathstoreUpdate()
'
' BathstoreUpdate Macro
'
'
ActiveWindow.ScrollRow = 3
ActiveWindow.ScrollRow = 4
ActiveWindow.ScrollRow = 5
ActiveWindow.ScrollRow = 6
ActiveWindow.ScrollRow = 7
ActiveWindow.ScrollRow = 8
ActiveWindow.ScrollRow = 9
ActiveWindow.ScrollRow = 10
ActiveWindow.ScrollRow = 11
ActiveWindow.ScrollWorkbookTabs Sheets:=-1
ActiveWindow.ScrollWorkbookTabs Sheets:=-1
ActiveWindow.ScrollWorkbookTabs Sheets:=-1
ActiveWindow.ScrollWorkbookTabs Sheets:=-1
Sheets("Total Raw Footfall Data").Select
ActiveWindow.SmallScroll Down:=-21
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
Range("G1808").Select
Range(Selection, Selection.End(xlToRight)).Select
Range("GF1808:GH1808").Select
Range("V1828").Select
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 3
Range("G1808:GE1808").Select
Selection.Copy
ActiveWindow.ScrollColumn = 166
ActiveWindow.ScrollColumn = 155
ActiveWindow.ScrollColumn = 136
ActiveWindow.ScrollColumn = 106
ActiveWindow.ScrollColumn = 97
ActiveWindow.ScrollColumn = 92
ActiveWindow.ScrollColumn = 86
ActiveWindow.ScrollColumn = 80
ActiveWindow.ScrollColumn = 73
ActiveWindow.ScrollColumn = 66
ActiveWindow.ScrollColumn = 59
ActiveWindow.ScrollColumn = 52
ActiveWindow.ScrollColumn = 43
ActiveWindow.ScrollColumn = 34
ActiveWindow.ScrollColumn = 26
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 3
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
Sheets.Add After:=Sheets(Sheets.Count)
Workbooks.Open Filename:= _
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Welcome to the Board.

Do you mean Range("G1809:GE1809")? Try:

Code:
Sub Test()
    Dim NextRow As Long
    NextRow = Range("G" & Rows.Count).End(xlUp).Offset(1).Row
    Range("G" & NextRow & ":GE" & NextRow).Select
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,287
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top