locked
loop on filtered data using vba RRS feed

  • Question

  • 

    Hi Guys, below is my requirement: I have 3 columns and want to filter data using vba: filter on column1 and loop on this range to find all the names from that group and display count against each month in a table. Please find attached excel with sample data. Thanks in advance.

    Note: I have posted same question on below forums:

    
    http://www.excelforum.com/excel-programming-vba-macros/1057458-loop-on-filtered-data-using-vba.html
    
    http://www.mrexcel.com/forum/excel-questions/826103-loop-filtered-data-using-visual-basic-applications.html



    Thanks, Nilesh


    Monday, December 29, 2014 5:25 AM

Answers

  • You can create a pivot table for this purpose.

    Add Names to the Row Labels area, Months to the Column Labels areas, and Groups to the Values area.


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Monday, December 29, 2014 10:43 AM

All replies

  • You can create a pivot table for this purpose.

    Add Names to the Row Labels area, Months to the Column Labels areas, and Groups to the Values area.


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Monday, December 29, 2014 10:43 AM
  • 
    I need to create chart based on the output. I am opting for vba as I want to automate this process. Also I need to show last 12 months data only. So I think Pivot table can not be option. 


    Thanks, Nilesh

    Monday, December 29, 2014 10:49 AM
  • Please don't put ordinary text in a code block. It makes it more difficult to read the text.

    It's possible to filter a pivot table, and you can create a chart from a pivot table.


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Monday, December 29, 2014 11:56 AM