Carry Over daily total DATA macro

DJFANDANGO

Board Regular
Joined
Mar 31, 2016
Messages
113
Office Version
  1. 365
Platform
  1. Windows
Hi,

Hopefully this explanation is easier to understand of what I'm after...


I have created a worksheet, I need to carry data over from the last sheet to the 'active sheet' (this will always be the same cell on the worksheet) so that once I add values into the relevant cells it 'autosums', then when I click the macro to make a new sheet for the next day, the TOTAL number is carried over and ready to be added to with the autosum feature...?

example:
- On Monday 'Sheet1' G7 has a value of 100 and G8 is 0 (because I need to add data into G8 on a daily basis)
- On Tuesday 'Sheet2' I create a new day worksheet on the same workbook and 100 is there in G7, I now add the 'daily figure' of (6) to G8 and I want that to add to G7 on the new sheet
- On Wednesday when I create 'Sheet3' G7 should now be populated with 106 (and the process will repeat daily)

this is the macro I have so far... (it works for copying over all the info i need, I just cant get the 'autosum' to work on a new sheet to then carry over to teh 'next sheet'


Sub CopyActiveSheetToLast()
ActiveSheet.Copy Before:=Worksheets(1)
Range("$A$13:$N$73").ClearContents
Range("$A$13:$N$73").Interior.Color = xlNone
Range("G8:G11").ClearContents
Range("N4:N5").ClearContents
Range("$A$13") = "Commendations - "
Range("N11") = "0"
Range("N4:N5") = "0"
Range("G8:G12") = "0"

End Sub



Any ideas? PLEASE HELP!
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
1006how many sheets ?4
this is sheet 1
sheet 2 has A1=106 and A2 = 35
this macro was run and it placed 141 in A1 of sheet 3
and updated Q1 on this sheet from 3 to 4
ready for the next day
n = Cells(1, 17)
nn = n - 1
Sheets(nn).Select
AA = Cells(1, 1) + Cells(1, 2)
Sheets(n).Select
Cells(1, 1) = AA
Sheets(1).Select
Cells(1, 17) = Cells(1, 17) + 1
End Sub

<colgroup><col span="18"></colgroup><tbody>
</tbody>
 
Upvote 0
Hi oldbrewer,

Thanks for th reply, excuse my ignorance but do I just add the information below to my existing macro?

n = Cells(1, 17)
nn = n - 1
Sheets(nn).Select
AA = Cells(1, 1) + Cells(1, 2)
Sheets(n).Select
Cells(1, 1) = AA
Sheets(1).Select
Cells(1, 17) = Cells(1, 17) + 1
End Sub

Thanks again
 
Upvote 0
I do not know what your existing macro does. In principle you can add it, or you could name this macro, say macro2, and from your existing macro probably the last line before end sub put call macro2
 
Upvote 0

Forum statistics

Threads
1,217,409
Messages
6,136,455
Members
450,013
Latest member
k4kamal

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