+ Reply to Thread
Results 1 to 10 of 10

add item to dynamic named range

  1. #1
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    add item to dynamic named range

    Hello,

    In the attached workbook, I have identical sets of data in column A separated by an blank cell. I need a macro for the user form that i need to build. The code needs to find the end of each named range, (Range1,Range2 and Range3), to insert blank row at the end of each range and to copy the value of the textbox from the user form in each row so to keep the sets of data identical.

    I count on your help.

    Thank you!
    Attached Files Attached Files
    Last edited by Bob@Sun; 12-13-2009 at 10:41 AM.

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: add item to dynamic named range

    Hi, Try:-
    Please Login or Register  to view this content.
    Regards Mick

  3. #3
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: add item to dynamic named range

    Yes, It does the job

    Thanks A lot!

  4. #4
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: add item to dynamic named range

    Hi mick,

    Sorry but i need just a little change in the code

    Please see the attached file and look at the merged cells between the data series.

    Thanks !
    Attached Files Attached Files

  5. #5
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: add item to dynamic named range

    Hi,Merged Cells are not a good idea with code, if you can possibly avoid them, it will make like easier.
    Regards Mick

  6. #6
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: add item to dynamic named range

    Well in this case can you make it so when a new row is insert with Item19 to have
    one blank cell below the new item and after that 3 blank cell before tha new set. In the file attached with yellow are the 3 blank cells that i need instead of the merged one.

    So each time a new item is inserted i need one blank cell before the yellow cells and then 3 cells before the new set

    I hope I explained well.
    Attached Files Attached Files

  7. #7
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: add item to dynamic named range

    Hi, Try this, see if it fits !!:-
    Please Login or Register  to view this content.
    Regards Mick

  8. #8
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: add item to dynamic named range

    Gives an Error:

    Compile Error:

    For without next

  9. #9
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: add item to dynamic named range

    Hi, Sorry Bad bit of Copying !!!
    Please Login or Register  to view this content.
    Regards Mick

  10. #10
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: add item to dynamic named range

    Great!

    Now is ok!

    Appreciate it!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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