Macro to update information if date changes

W

Wundrfulthing

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
 
B

Bob Phillips

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top