Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default Copying data from one sheet to another on a specific date

Hi,
I posted this in the worksheet functions forum but no response...so I
thought that I would try here..

I want to be able to automatically copy data from one sheet to another sheet
on the last day of the month (the sheets are in the same workbook) when the
user opens or saves it (either way would be fine)

On sheet 1 there is a running total say cell C3 and on sheet 2 the
destination cells Jan, Feb, March etc.

Is there a way to have my running total populate the correct months figures
while keeping the previous months total. Just now the user manually inputs
the figures but if I can automate this task it would save time for the user.

I hope that I have explained the problem clearly enough.....

Any help you can provide would be appreciated.

Gav.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Copying data from one sheet to another on a specific date

Use the year as the column index and month as the row index to the
cell on Sheet2, something like:
Sub SaveMonthlySubtotal()
Dim yr As Integer, mon As Integer
mon = Month(Now)
yr = Year(Now) - 2005
Sheets("Sheet1").Range("A3").Copy _
Destination:=Sheets("Sheet2").Cells(mon, yr)
End Sub
Adjust the mon and yr variables to get the value into the cell you
want.

HTH
Carl

On May 2, 3:21 am, Gav123 wrote:
Hi,
I posted this in the worksheet functions forum but no response...so I
thought that I would try here..

I want to be able to automatically copy data from one sheet to another sheet
on the last day of the month (the sheets are in the same workbook) when the
user opens or saves it (either way would be fine)

On sheet 1 there is a running total say cell C3 and on sheet 2 the
destination cells Jan, Feb, March etc.

Is there a way to have my running total populate the correct months figures
while keeping the previous months total. Just now the user manually inputs
the figures but if I can automate this task it would save time for the user.

I hope that I have explained the problem clearly enough.....

Any help you can provide would be appreciated.

Gav.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default Copying data from one sheet to another on a specific date

Hi Carl,

Thanks for your response... The macro is almost working perfectly, there is
one slight problem I need it to keep the integrity of the previous month data
for example..

Say April was 20% and May is 30% when the data is transferred to sheet
called "Monthly Graph" it updates both April and May to 30% and I need April
to remain as 20%

Sub SaveMonthlySubtotal()
Dim yr As Integer, mon As Integer
mon = Month(Now)
yr = Year(Now) - 2005
Sheets("Overall").Range("D5").Copy _
Destination:=Sheets("Monthly Graph").Cells(mon, yr)
End Sub

Is it possible to have the months update but keep the previous months totals?

Your help is appreciated..

Gav.

"Carl Hartness" wrote:

Use the year as the column index and month as the row index to the
cell on Sheet2, something like:
Sub SaveMonthlySubtotal()
Dim yr As Integer, mon As Integer
mon = Month(Now)
yr = Year(Now) - 2005
Sheets("Sheet1").Range("A3").Copy _
Destination:=Sheets("Sheet2").Cells(mon, yr)
End Sub
Adjust the mon and yr variables to get the value into the cell you
want.

HTH
Carl

On May 2, 3:21 am, Gav123 wrote:
Hi,
I posted this in the worksheet functions forum but no response...so I
thought that I would try here..

I want to be able to automatically copy data from one sheet to another sheet
on the last day of the month (the sheets are in the same workbook) when the
user opens or saves it (either way would be fine)

On sheet 1 there is a running total say cell C3 and on sheet 2 the
destination cells Jan, Feb, March etc.

Is there a way to have my running total populate the correct months figures
while keeping the previous months total. Just now the user manually inputs
the figures but if I can automate this task it would save time for the user.

I hope that I have explained the problem clearly enough.....

Any help you can provide would be appreciated.

Gav.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Copying data from one sheet to another on a specific date

I set up a new workbook with two sheets and your cells and macro, and
it works perfectly. You must have something else going on. Take
another look. Maybe a formula or merged cells? Want me to take a
look at it?

Carl.

On May 4, 4:41 am, Gav123 wrote:
Hi Carl,

Thanks for your response... The macro is almost working perfectly, there is
one slight problem I need it to keep the integrity of the previous month data
for example..

Say April was 20% and May is 30% when the data is transferred to sheet
called "Monthly Graph" it updates both April and May to 30% and I need April
to remain as 20%

Sub SaveMonthlySubtotal()
Dim yr As Integer, mon As Integer
mon = Month(Now)
yr = Year(Now) - 2005
Sheets("Overall").Range("D5").Copy _
Destination:=Sheets("Monthly Graph").Cells(mon, yr)
End Sub

Is it possible to have the months update but keep the previous months totals?

Your help is appreciated..

Gav.



"Carl Hartness" wrote:
Use the year as the column index and month as the row index to the
cell on Sheet2, something like:
Sub SaveMonthlySubtotal()
Dim yr As Integer, mon As Integer
mon = Month(Now)
yr = Year(Now) - 2005
Sheets("Sheet1").Range("A3").Copy _
Destination:=Sheets("Sheet2").Cells(mon, yr)
End Sub
Adjust the mon and yr variables to get the value into the cell you
want.


HTH
Carl


On May 2, 3:21 am, Gav123 wrote:
Hi,
I posted this in the worksheet functions forum but no response...so I
thought that I would try here..


I want to be able to automatically copy data from one sheet to another sheet
on the last day of the month (the sheets are in the same workbook) when the
user opens or saves it (either way would be fine)


On sheet 1 there is a running total say cell C3 and on sheet 2 the
destination cells Jan, Feb, March etc.


Is there a way to have my running total populate the correct months figures
while keeping the previous months total. Just now the user manually inputs
the figures but if I can automate this task it would save time for the user.


I hope that I have explained the problem clearly enough.....


Any help you can provide would be appreciated.


Gav.- Hide quoted text -


- Show quoted text -


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying Data from one sheet to another sheet on a specific day Gav123 Excel Worksheet Functions 0 May 1st 07 10:17 AM
Problem copying to another sheet with specific criteria Bob Excel Programming 4 October 29th 06 01:07 AM
Copying specific cells from a sheet to another Catalin Excel Discussion (Misc queries) 1 July 28th 06 11:59 PM
Copying Specific Values From Sheet Jenn Excel Discussion (Misc queries) 1 July 11th 05 09:22 PM
Copying specific rows from one sheet to another Chris Excel Programming 2 October 17th 03 11:40 PM


All times are GMT +1. The time now is 03:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"