+ Reply to Thread
Results 1 to 3 of 3

Data Selection and Filtering Macro - Tweaking the code

  1. #1
    Forum Contributor
    Join Date
    11-02-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    353

    Data Selection and Filtering Macro - Tweaking the code

    Dear all,
    Need your help once again. Recently another forumer helped me with creating a Macro.
    Quote Originally Posted by Andrew.Trevayne View Post
    Hi everyone,
    I would like you help once again on a Macro that does some filtering on a Data Source.
    On my example I have 2 sheets, "Summary" and "Data".
    I have a bunch of dropdown list on my "Summary" page.
    I would like to be able to do selections on these dropdowns and when I run the macro, I wanted to copy the data from the sheet "Data" (based on my dropdown selections).
    It's sort of filtering?
    Also I would like to get the sum for the period selected.
    Attached is a dummy spreadsheet which would probably explain. I hope you could take a look and help me.
    Thank you so much.

    Here is the link --> http://www.excelforum.com/excel-prog...ing-macro.html

    It is working as expected however I need a little bit of modification.
    See, when I select the period (date) I get the results. However when the period selected on my dropdown list does not exist on my "Data" sheet, I run into an error "Type Mismatch"
    Would you be able to help me modify the below code so that if the period selected does not exist, it will only put 0 or blank on the first line of the table (B to F).
    In my attached example, I removed "December" from the "Data" Sheet, if I select it on the list of my MainPage, it should not have an error message rather it will be give me results of "0" or blank on the table of my "MainPage" sheet.

    Here are the current codes:

    Please Login or Register  to view this content.
    Thanks again and I hope you could help me and take a look.

    Regards,
    Andrew
    Attached Files Attached Files
    Last edited by Andrew.Trevayne; 02-27-2017 at 01:20 AM.

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Data Selection and Filtering Macro - Tweaking the code

    Please Login or Register  to view this content.
    Kind regards
    Leo

  3. #3
    Forum Contributor
    Join Date
    11-02-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    353

    Re: Data Selection and Filtering Macro - Tweaking the code

    Quote Originally Posted by LeoTaxi View Post
    Please Login or Register  to view this content.
    Kind regards
    Leo
    This is wonderful Leo. Thank you so very much.
    Appreciate all the help.

    Cheers,
    Andrew

+ 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] Data Selection and Filtering Macro
    By Andrew.Trevayne in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-19-2017, 10:58 PM
  2. Replies: 8
    Last Post: 09-30-2016, 02:08 PM
  3. [SOLVED] Applying filtering on data validation selection
    By Franki81 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-05-2016, 07:09 AM
  4. [SOLVED] code for data range selection to create a line graph in a macro
    By dominicm in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-17-2015, 09:35 AM
  5. A macro code for filtering data based on some conditions
    By Verbamore in forum Excel Programming / VBA / Macros
    Replies: 35
    Last Post: 08-21-2014, 11:04 AM
  6. Replies: 5
    Last Post: 03-14-2013, 02:38 PM
  7. Tweaking of Macro Code to sort rows
    By swoosh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-22-2012, 02:14 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