+ Reply to Thread
Results 1 to 7 of 7

Macro to select, copy, and, paste multiple categories.

  1. #1
    Registered User
    Join Date
    03-15-2011
    Location
    Rio Rancho, NM
    MS-Off Ver
    Excel 2010
    Posts
    21

    Macro to select, copy, and, paste multiple categories.

    Hello,

    I have a macro project that I'm working on. The attached spreadsheet has a pdf, results, data, and list tab. There is a macro built in to the purple button that allows me to search a category from the data tab, and will paste the results (in the results tab). The coding problem I'm having is that I need to be able to select multiple categories at once, for example, standard DME and complex rehab. I've attached the spreadsheet with the macro. Any help with this would be greatly appreciated.

    Thank you.
    Attached Files Attached Files
    Last edited by rygon8; 03-30-2011 at 07:48 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,378

    Re: Macro to select, copy, and, paste multiple categories.

    Hi rygon8 and welcome to the forum,

    I have a suggestion. Instead of using a Macro, how about using simple AutoFilters on your Data Tab?
    Using Excel 2010, click on your Data Tab and then click anywhere in your table. Click on the Data Tab (at the top of the screen to view the Excel Icons and click on "Filter". This will put dropdowns on each of your column headings. Then click on the Category dropdown and select multiple filters. This will give you a list just like your Results Tab.

    If you need a separate Results tab to show your data and can't use AutoFilters you should look at Advanced Filters using the OR condition. That would filter Categories like you discribe above. Here is a good site to show AND and OR examples. http://www.contextures.com/xladvfilter01.html
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    03-15-2011
    Location
    Rio Rancho, NM
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Macro to select, copy, and, paste multiple categories.

    Quote Originally Posted by MarvinP View Post
    Hi rygon8 and welcome to the forum,

    I have a suggestion. Instead of using a Macro, how about using simple AutoFilters on your Data Tab?
    Using Excel 2010, click on your Data Tab and then click anywhere in your table. Click on the Data Tab (at the top of the screen to view the Excel Icons and click on "Filter". This will put dropdowns on each of your column headings. Then click on the Category dropdown and select multiple filters. This will give you a list just like your Results Tab.

    If you need a separate Results tab to show your data and can't use AutoFilters you should look at Advanced Filters using the OR condition. That would filter Categories like you discribe above. Here is a good site to show AND and OR examples. http://www.contextures.com/xladvfilter01.html
    Hi MarvinP,

    Unfortunately filters will not work for this project. It needs to be more powerful (or appear to be) for the end user. The end user (a very particular VP) has very little Excel experience and has no real desire to learn any features in Excel. They need to click on a button, have the result, and then save to PDF.

    Thank you for your reply.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,378

    Re: Macro to select, copy, and, paste multiple categories.

    Can you use Advanced Filters at the top of the Results Page?

    You could have two levels of Category and then press the big purple button.

    Did you look at Advanced Filters?

  5. #5
    Registered User
    Join Date
    03-15-2011
    Location
    Rio Rancho, NM
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Macro to select, copy, and, paste multiple categories.

    Quote Originally Posted by MarvinP View Post
    Can you use Advanced Filters at the top of the Results Page?

    You could have two levels of Category and then press the big purple button.

    Did you look at Advanced Filters?
    Hi

    Yes, I have tried the advanced filters. That will not satisfy the end user's requirements. I need to be able to select any or all of the categories in a simple way (drop down menu), I realize that I will have to add in multiple rows so that the user can select which categories they wish.

    Thank you again.

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,378

    Re: Macro to select, copy, and, paste multiple categories.

    I thought I had attached this file. See if this works.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-15-2011
    Location
    Rio Rancho, NM
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Macro to select, copy, and, paste multiple categories.

    Quote Originally Posted by MarvinP View Post
    I thought I had attached this file. See if this works.
    Mr. MarvinP

    So that is is what you meant about the advanced filtering, that was way over my head. Thank you, this works perfectly. I think I can modify the code from there if needed.

    Very much appreciated.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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