Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Insert Rows, based on data in range, using VBA

  Asked By: Lamberta    Date: Sep 02    Category: MS Office    Views: 1462
  

I’ve used excel extensively for a
number of years but I’ve really only begun to explore all of the higher-end
capabilities in the last year or so. I’ve been reading about / learning VBA
for the past few months. I mainly use it for work to do financial modeling
and to automate some of the routinized things I have to do.

I’ve enjoyed reading the questions put forth and will endeavor to jump-in and
help someone else when the opportunity arises.

I’m trying to write a Macro to automatically insert rows between based on data
in a range.

I’ve got a list of data columns:
Record Number, Termination Date, Cost, Schedule Number, etc. there are several
rows of data that have the same Schedule Number and I want to be able to
select the whole range, and have rows be inserted between different Schedule
Numbers.

I’ve got a macro that auto inserts rows but, as is, it is really no better
than using the drop down menu in excel.

Sub Test1()
Range(ActiveCell, Cells(ActiveCell.Row + 10,
ActiveCell.Column)).EntireRow.Insert

End Sub

Any ideas?

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Insert Rows, based on data in range, using VBA Or get search suggestion and latest updates.




Tagged: