ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Macro to update information if date changes (https://www.excelbanter.com/new-users-excel/209251-macro-update-information-if-date-changes.html)

Wundrfulthing

Macro to update information if date changes
 
using Exel 2000..

I want excel to compare dates on two seperate worksheets and if the date on
the first is greater than the second to insert rows and than copy cells on
the second to different cells also on the second page.

ie..main sheet date is 11-05-08 compared to sheet2 date is 11-04-08...insert
cells at a21:d21 and shift cells down (on sheet2) then copy cells b13:h13 to
a21:b21


Bob Phillips[_3_]

Macro to update information if date changes
 
The description seems a bit inconsistent, but here is a shot


With Worksheets("Main Sheet")

If .Range("A1").Value Worksheets("Second Sheet").Range("A1").Value

Worksheets("Second Sheet").Rows(21).insert
.Range("B13:H13").Copy Worksheets("Second Sheet").Range("A21")
End If
End With

--
__________________________________
HTH

Bob

"Wundrfulthing" wrote in message
...
using Exel 2000..

I want excel to compare dates on two seperate worksheets and if the date
on
the first is greater than the second to insert rows and than copy cells on
the second to different cells also on the second page.

ie..main sheet date is 11-05-08 compared to sheet2 date is
11-04-08...insert
cells at a21:d21 and shift cells down (on sheet2) then copy cells b13:h13
to
a21:b21





All times are GMT +1. The time now is 02:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com