PDA

View Full Version : Copy Data



bobby_793
04-03-2008, 01:08 AM
Helloo

I have data on sheet range (A:G) these range values iam copy same sheet in next range (J:O) manualy in order to uptodate the month to date values. My question is is there any way when i change the Month (1,2,3,4,5,6,7,8,9,10,11,12) in numbers change not full month then the range (A:G) should copy it self to Range (J:O)..

Thank you


Bobby

georgiboy
04-03-2008, 01:57 AM
you could try something like this
Sub Mover()
' This could be Date() or a date on your sheet
date1 = Sheets("Sheet1").Range("H1").Value
If Month(date1 - 1) <> Month(date1) Then
Range("J:P") = Range("A:G").Value
End If
End Sub

then put this in the workbook
Private Sub Workbook_Open()
Call Mover
End Sub

the only thing is it will move the data every time you open the workbook on the first of every month.

Hope this helps

mdmackillop
04-03-2008, 11:02 AM
Bobby,
Can you post a sample showing what you're after?