+ Reply to Thread
Results 1 to 4 of 4

Copy ranges of cells using names from the Name Manager - Macro Needed

  1. #1
    Registered User
    Join Date
    12-23-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    28

    Copy ranges of cells using names from the Name Manager - Macro Needed

    Please see the attached spread sheet. Is it possible to have a macro that can use the list on the sheet "Items List" and match what it finds to a "Name" in excels Name Manager (this would select the range of cells I am needing) then run the macro "Copy_to_Takeoff" then go to the next item in the list and do the same, and so on, and so on until there is nothing left in the list?
    This would give me the ability to create any list I need and only run one macro.

    Step one: Open Sheet "Items List"
    Step Two: Use Cell B3 to match to a Name in Excels Name Manager
    Step Three: Run the macro "Copy_to_Takeoff"

    Step Four: Repeat Step one
    Step Five: Use Cell B4 to match to a Name in Excels Name Manager
    Step Six: Repeat Step Three

    and so on and so on...

    Thanks in advance to anyone willing to help. This will be a huge time saver for me.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Copy ranges of cells using names from the Name Manager - Macro Needed

    Try this.

    I use an array to stop going back to the list of named ranges.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-23-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: Copy ranges of cells using names from the Name Manager - Macro Needed

    Wow, that worked great! Thank you. Since I have your attention can you help me with one more thing? Is there a way to insert that underscore in front of those numbers in the list either through some excel function or macro? The reason I ask is I want to just be able to type those numbers and then add the underscore after. Maybe this is worth another thread, just let me know.

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Copy ranges of cells using names from the Name Manager - Macro Needed

    Try this.

    I added one line of code. Modify it if it isn't exactly what you need.

    Presently it inserts an underscore at the start of the name if it isn't already an underscore.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-23-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: Copy ranges of cells using names from the Name Manager - Macro Needed

    Thanks again. I am getting a run time error I think due to the decimal places. When there is a zero at the end it is dropped when the underscore is added. Any way to fix that?

+ 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. Macro needed: match names in different columns; then copy and paste range
    By msmith7113 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-08-2013, 11:56 AM
  2. [SOLVED] To use name manager or create dynamic ranges in VBA
    By chrisjames25 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-19-2013, 03:37 PM
  3. Having many dynamic ranges in Name Manager
    By gogita in forum Excel General
    Replies: 0
    Last Post: 09-05-2013, 04:26 AM
  4. Replies: 0
    Last Post: 07-13-2012, 06:01 AM
  5. [SOLVED] Defining Names in Name Manager
    By frksdf in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 12-26-2011, 03:06 AM

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