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?
 
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
 
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
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
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
 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.