• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Insert Row With Formula

T3ngatsu

New Member
Hi, i am trying to have the ability for the user to add or remove row when needed. when the line is added, the formula should still apply in the new row. I have attached the file that have the formula. Please kindly help if anyone know how I can created this. Thank you.
 

Attachments

Hi ,

Can you specify where the new row will be inserted ? Will it be between row 6 and row 7 or before row 6 or after row 7 ?

Narayan
 
Hi Narayan,

Thanks for ur reply. The row 7 is an example of how I want it to do when user click on "add" button. So every time user click "add" it will go to next line. So if no row 7 the when click add it will add row 7 and when needed to add another row pressing "add" again should add row 8 and user can continue to "add" if needed. Thanks hope this clears it up.
 
Hi ,

This is somewhat complicated , since the formulae in D7 and E7 are different from D6 and E6 , but from row 8 onwards , they will be the same i.e. the formulae in D8 and E8 will be copies of the formulae in D7 and E7.

This will have to be hard-coded in the macro.

Narayan
 
Wow Narayan,

Yes that is something i'm looking for. Your really good at it. sorry to ask, is it very similar coding if to remove the line as well? thanks so much again!
 
Hi ,

The problem with removing lines , which I have not yet looked into , may be that as the formula in the next row below the row you are on when you press the Remove button is referring to the row , when you delete the row , all formulae below that row may generate an error.

Let me see whether this problem occurs , and if so , how to resolve it.

What do you want should happen when you press the Remove button ? Should the last row be removed , or should the row where the cursor is placed be removed ?

Narayan
 
Hi,
Yes, i would like to remove the last one at the very bottom, so if i have inserted row to A9 and now just want to remove A9 as was an extra. That's the only function I need for the remove row. Thank you again for ur kind help.
 
Thats perfect Narayan!!!! thansk so mucch for your help. I have been pondering over this for a long time and you helped me solved this. Many thanks again.
 
Back
Top