insert rows based on cell value

Microsoft Office excel 2007 home & stude...
June 2, 2010 at 06:54:59
Specs: Windows Vista
To anyone that can help,

I am trying to find a way to insert a number of rows based on what value is in the cell in column AF. So if "1" is the value cell AF2, then an emptry row is inserted below. Likewise, if there was a "3" in AF2, three rows would be inserted. To be honest I don't have any knowledge on how to work Macros but after searching on the web, it appears that this is the only way to do such a task. Please let me know if any other information is required. Any help would be greatly appreciated.


See More: insert rows based on cell value

Report •

#1
June 2, 2010 at 08:40:27
Yes, VBA (macros) is the only way to do this.

Before we can offer you some code, you need to clarify something for us.

You said: based on what value is in the cell in column AF.

Then you said: So if "1" is the value cell AF2...

Is AF2 the only cell that will need to be evaluated and have rows inserted below?

In other words, will it always be AF2 or might you need rows inserted after AF11 sometimes, AF25 some other times, etc.

Another question:

How do you want the code to be triggered? Manually by clicking a button? Automatically as soon as the value is entered by the user? Automatically when the value is calculated by Excel? etc.


Report •
Related Solutions


Ask Question