+ Reply to Thread
Results 1 to 9 of 9

How to insert rows by changing drop down list numbers

  1. #1
    Forum Contributor
    Join Date
    10-01-2010
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    125

    How to insert rows by changing drop down list numbers

    Hi, Please find the attached excel sheet with the example

    Question 1: How to insert rows based on changing "Check4" values from drop down list immediately after that row. If check4 value is 1 means I want to add one row; if it is 2, then I want to add 2 rows. This has to happen automatically when I change Check4 value without executing any macro manually if it is possible. And also it has to copy the data and formula's from row2 to the added rows. This should be the case with Column D. If I change the numbers in Column D, it has to add rows immediately after that row along with copying the data and formula

    Question 2: How to enable drop down list which I have created in cell D2 to other rows in the same column without creating manually in the attached excel sheet

    Can you help me to get the above answers.

    Sincerely
    Krish
    Attached Files Attached Files
    Last edited by krish T; 10-01-2013 at 11:17 PM. Reason: To make the post more clear

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Inserting rows based on change in drop down list number

    Perhaps: Test.xlsm
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Forum Contributor
    Join Date
    10-01-2010
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    125

    Re: Inserting rows based on change in drop down list number

    Thanks Solus for the quick answer. I am also looking to copy the data & formula to inserted rows when changing Check4 values.

    Thanks
    Krish

  4. #4
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: How to insert rows by changing drop down list numbers

    Like this? Attachment 268555


    Sorry. Bad attachment. Let me repost.

  5. #5
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: How to insert rows by changing drop down list numbers

    How about: Test.xlsm

  6. #6
    Forum Contributor
    Join Date
    10-01-2010
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    125

    Re: How to insert rows by changing drop down list numbers

    Thanks Solus for the reply. I am not able to see the macro in the given excel sheet. Can you resend the file again so that I can see the code in View Macro option

    Thanks
    Krish

  7. #7
    Forum Contributor
    Join Date
    10-01-2010
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    125

    Re: How to insert rows by changing drop down list numbers

    Hi Sous, I am able to see the macro. Please ignore my previous message. But I am seeing formula error when copying the data in inserted row. Attached is the spreadsheet with the example. When I am giving input 1 in Cell G3, Cell F5 formula is showing error. How to avoid this formula error when copying the data and formula.

    Thanks
    Krish
    Attached Files Attached Files

  8. #8
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: How to insert rows by changing drop down list numbers

    Check the formulas in your original spreadsheet before running the macro. There isn't a formula in F2 and the rest of the formulas seem to be off by one cell. They are not the same formulas that you included in your original example.

    What are the formulas actually going to be?

  9. #9
    Forum Contributor
    Join Date
    10-01-2010
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    125

    Re: How to insert rows by changing drop down list numbers

    This is my intention not to give formula in F2. Formula started from F3 in column F. This formula is linking with the values in the same row and the previous row. In this case in F3 is =E3*D2 and in F4 is =E4*D3, so when I add a row using macro in G3 by selecting 1, 4th row seems to be ok in F4 (=E4*D3) but 5th row not seems to be ok in F5 (=E5*D3) because actually it should be =E5*D4. I hope you got the problem.

    Thanks
    Krish

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Change a cell based on a drop down list
    By nickmax1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-24-2012, 06:25 AM
  2. [SOLVED] Inserting number of rows based on a count of data
    By Ranelagh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-15-2012, 10:30 AM
  3. Inserting rows based on unknown number of tabs
    By Reg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-26-2011, 01:44 PM
  4. Inserting New Rows Based on Number in Column
    By althanis in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-28-2010, 08:50 AM
  5. [SOLVED] change info in other cells when i change a number in a drop list?
    By macbr549 in forum Excel General
    Replies: 2
    Last Post: 09-10-2005, 10:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1