Macro to line up rows

M

missy

Hi,

Please help:

How do I write a macro that will line up the rows if for example cells
A5 = D7.

That is, if cell A5 is the same as cell D7, then I want to:
Range("A5:C6").Select
Selection.Insert Shift:=xlDown

I want to do this for all values in column A starting with A5.

Thank you.
 
D

Don Guillett Excel MVP

Hi,

Please help:

How do I write a macro that will line up the rows if for example cells
A5 = D7.

That is, if cell A5 is the same as cell D7, then I want to:
    Range("A5:C6").Select
    Selection.Insert Shift:=xlDown

I want to do this for all values in column A starting with A5.

Thank you.

"If desired, send your file to dguillett @gmail.com I will only look
if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results."
 

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