Inserting a row in sheet A should Insert a row in sheet B, removing a row in Sheet A should remove t

H

Hannes Heckner

Hi,

I need a excel programming which does the following:

Whenever I insert a row in sheet A a corresponding row in sheet B needs to be
inserted. The correspondence is given by a offset to a named top row

When removing a row in sheet A the corresponding row in sheet B should be
removed.

How can I react on insertion and deletion in excel?

Best regards
Hannes
 
B

Bob Phillips

Hannes,

There is no row insert or delete events to react to, so you need to build a
macro that does the initial delete and handles the consequence, like

myRow = 8
Worksheets("SheetB").Rows(8).entirerow.delete
Worksheets("SheetA").Rows(8).entirerow.delete

and

myRow = 8
Worksheets("SheetB").Rows(8).entirerow.insert
Worksheets("SheetA").Rows(8).entirerow.insert

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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