Inserting Rows on the fly

M

Matt

I have an interesting project to work on and I am not quite sure what
the best method to attack it would be.

I have two sheets.... 'Footages' and 'Breakdown'

Footages is a general line item description with footages for each
floor, with the floors laid out in columns starting with 1 thru X

Breakdown pulls the description and the total footage from the
Footages sheet.

What I need to do is dynamically create line items in the Breakdown
sheet per floor. Example: If I enter on the Footages page, Wall Type
A, with 100 feet on each of the first 3 floors, I have 300 total feet
for Wall Type A but on my Breakdown sheet I need it pull the total
line, then recognize something in the 1st floor column and add a line
item below the total and do the same for the 2nd floor, the 3rd floor,
and so on...
 
M

Matt

It looks to me like you'll need a Worksheet.Change event on the Footages
sheet.









- Show quoted text -

Okay. That is what I was thinking but I wasn't sure if using some
type of Event Handler would be the best method.
 
G

Guest

I would recommend putting something at the beginning to check for the
specific cells that you are updating. Something like this:

If not intersect(target,Range("A3")) is nothing then
'Put your actions here.
End if

I'd also recommend that you give your worksheets some CodeNames. Try right
clicking on either of the sheet tabs and view code. Then press F4 to see the
properties window. In the Project window, select (say) the Footages sheet.
In the Properties window, you'll probably see

(Name) Sheet1

Change Sheet1 to Footages.

When you reference items on that sheet, use

Footages.range(...) or
Footages.Cells(...)

I find it easier to keep track of my code when I use Worksheet CodeNames.

HTH,
Barb Reinhardt
 
M

Matt

I would recommend putting something at the beginning to check for the
specific cells that you are updating. Something like this:

If not intersect(target,Range("A3")) is nothing then
'Put your actions here.
End if

I'd also recommend that you give your worksheets some CodeNames. Try right
clicking on either of the sheet tabs and view code. Then press F4 to see the
properties window. In the Project window, select (say) the Footages sheet.
In the Properties window, you'll probably see

(Name) Sheet1

Change Sheet1 to Footages.

When you reference items on that sheet, use

Footages.range(...) or
Footages.Cells(...)

I find it easier to keep track of my code when I use Worksheet CodeNames.

HTH,
Barb Reinhardt






- Show quoted text -

Thanks! I appreciate the comments and thoughts.

Matt
 

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