• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro to count after Autofiltering with nested for loop

Dhamo

New Member
Hyla there.


I need create a macro to filter with three different conditions. below is the input table.

SrNo CusName Status date

1 a five star 12/7/2012 

2 b four star 12/13/2012 

3 c two star 12/11/2012 

4 b two star 12/10/2012 

5 c one star 12/13/2012 

6 c two star 12/7/2012 

7 d two star 12/10/2012 

8 e two star 12/10/2012 

.

.

.etc


And I need output summary table like this.

condition 1: unique cus name and dates only

date 1

cus name one star two star three star four star five star

a 1 0 1 3 1

b 4 0 1 3 1

c 1 4 0 3 1

d 5 5 1 3 9

e 1 0 1 4 1


date 2

cus name one star two star three star four star five star

a 1 0 1 3 1

b 4 0 1 3 1

c 1 4 0 3 1

d 5 5 1 3 9

e 1 0 1 4 1


count goes on based on unique date count.


please help me on this.
 
Hello Dhamo,

Please search for "Pivot Tables" on this site (using the search box located in the upper right corner of this page). That might provide you the functionality you are after.


Cheers,

Sajan.
 
Thanks Sajan.


Is that possible to put run time filter condition and get the values from the pivot table using a macro?
 
You can setup what is called a "Report Filter". That will cause the Pivot Table to be filtered by the values / criteria set in the Report Filter. (You can also select multiple items in the filter, if needed.)


You can certainly refer to values in the pivot table using macros and formulas. Could you describe your use case? Based on your original post, it does not appear that macros or formulas are needed, but perhaps you have some additional, unstated requirements.
 
Good day Dhamo


What are you trying to achieve with the filtered data? With a Pivot Table you can filter as you require to end up with a report for printing or a Pivot Chart to show data, you mention macros, not sure why you are in need of them?
 
Thanks Sajan & bobhc.


My case is based on the filter value (Date), I need to update another workbook.
 
Back
Top