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:= _
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:= _