Excel Marco to insert rows

Hello..it's been a while since   I want to write a marco that insert 27 rows???
Jass SainiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saurabh Singh TeotiaCommented:
Assuming you want to insert rows at row-1 i mean above it you can do something like this...

Sub insertrows()
    Dim i As Long, rw As Long

    rw = 1

    For i = 1 To 27
        Rows(rw).Insert
    Next i

End Sub

Open in new window


Saurabh...
0
Phillip BurtonDirector, Practice Manager and Computing ConsultantCommented:
Rows("1:27").Insert
0
Jass SainiAuthor Commented:
Hello...that will only do row 1...to row 27..

i want to be able to click in the worksheet and insert 27 blank rows.  Sorry about the confusion
0
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

Saurabh Singh TeotiaCommented:
Okay what i understand you want to insert manually blank rows?? or you want to insert it programmatically on a particular row..? What you want to do??
0
Jass SainiAuthor Commented:
I know how to do it manually...but is there a way to just click and Crtl something and have keep inserting 27 blank rows?
0
Saurabh Singh TeotiaCommented:
Ahh if you are looking for shortcut key then its ctrl++

And then you can just pressing f4 to repeat the action 27 times or just select your rows which 1 to 27 and then do ctrl++

Another shortcut to do the same thing is alt+i+r
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jass SainiAuthor Commented:
So there is no way to do with one click
0
Jass SainiAuthor Commented:
Thank you on the other shortcut
0
Saurabh Singh TeotiaCommented:
Nope..Either you need to do action 27 times or you need to select 27 rows first and then do it 1 time like Matin Posted..Up-to you which way you want to do it..
0
Jass SainiAuthor Commented:
Thank you..
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.