premvinoth
New Member
- Joined
- Aug 4, 2015
- Messages
- 16
Hi,
I have about 1,500 rows of data as mentioned below. Everyday I would need to prepare a report for the previous 3 days. (That file contains only previous 3 days data). For each date, for each of the dealer, i need to count the product and generate a report as shown at the bottom...
[TABLE="class: outer_border, width: 500, align: left"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Dealer[/TD]
[TD]Product[/TD]
[/TR]
[TR]
[TD]08/03/2015[/TD]
[TD]Dealer A[/TD]
[TD]Mobile phone[/TD]
[/TR]
[TR]
[TD]08/03/2015[/TD]
[TD]Dealer A[/TD]
[TD]Watch[/TD]
[/TR]
[TR]
[TD]08/03/2015[/TD]
[TD]Dealer A [/TD]
[TD]Mobile Phone[/TD]
[/TR]
[TR]
[TD]08/03/2015[/TD]
[TD]Dealer A[/TD]
[TD]Laptop[/TD]
[/TR]
[TR]
[TD]08/03/2015[/TD]
[TD]Dealer A[/TD]
[TD]Laptop[/TD]
[/TR]
[TR]
[TD]08/03/2015[/TD]
[TD]Dealer A[/TD]
[TD]Mobile Phone[/TD]
[/TR]
[TR]
[TD]08/02/2015[/TD]
[TD]Dealer A[/TD]
[TD]Laptop [/TD]
[/TR]
[TR]
[TD]08/02/2015[/TD]
[TD]Dealer A[/TD]
[TD]Watch[/TD]
[/TR]
[TR]
[TD]08/02/2015[/TD]
[TD]Dealer A[/TD]
[TD]Watch[/TD]
[/TR]
[TR]
[TD]08/01/2015[/TD]
[TD]Dealer A[/TD]
[TD]Mobile phone[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 800"]
<tbody>[TR]
[TD]Dealer[/TD]
[TD]Dealer total count[/TD]
[TD]Day1 count[/TD]
[TD]Day1 product wise count[/TD]
[TD]Day2 count[/TD]
[TD]Day2 product wise count[/TD]
[TD]Day3 count[/TD]
[TD]Day3 product wise count[/TD]
[/TR]
[TR]
[TD]Dealer A[/TD]
[TD]10[/TD]
[TD]6[/TD]
[TD]3-Mobile phone, 2-Laptop, 1-Watch[/TD]
[TD]3[/TD]
[TD]2-Watch, 1-Laptop[/TD]
[TD]1[/TD]
[TD]1-Mobile phone[/TD]
[/TR]
</tbody>[/TABLE]
The product wise count needs to be in a descending order based on the count. Show here is sample data for one dealer (Dealer A), there are 10 dealers in the dataset, and this similar report needs to be generated in a single sheet.
I would highly appreciate your support in automating it in VBA. Thank you in advance.
Regards,
Vinoth
I have about 1,500 rows of data as mentioned below. Everyday I would need to prepare a report for the previous 3 days. (That file contains only previous 3 days data). For each date, for each of the dealer, i need to count the product and generate a report as shown at the bottom...
[TABLE="class: outer_border, width: 500, align: left"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Dealer[/TD]
[TD]Product[/TD]
[/TR]
[TR]
[TD]08/03/2015[/TD]
[TD]Dealer A[/TD]
[TD]Mobile phone[/TD]
[/TR]
[TR]
[TD]08/03/2015[/TD]
[TD]Dealer A[/TD]
[TD]Watch[/TD]
[/TR]
[TR]
[TD]08/03/2015[/TD]
[TD]Dealer A [/TD]
[TD]Mobile Phone[/TD]
[/TR]
[TR]
[TD]08/03/2015[/TD]
[TD]Dealer A[/TD]
[TD]Laptop[/TD]
[/TR]
[TR]
[TD]08/03/2015[/TD]
[TD]Dealer A[/TD]
[TD]Laptop[/TD]
[/TR]
[TR]
[TD]08/03/2015[/TD]
[TD]Dealer A[/TD]
[TD]Mobile Phone[/TD]
[/TR]
[TR]
[TD]08/02/2015[/TD]
[TD]Dealer A[/TD]
[TD]Laptop [/TD]
[/TR]
[TR]
[TD]08/02/2015[/TD]
[TD]Dealer A[/TD]
[TD]Watch[/TD]
[/TR]
[TR]
[TD]08/02/2015[/TD]
[TD]Dealer A[/TD]
[TD]Watch[/TD]
[/TR]
[TR]
[TD]08/01/2015[/TD]
[TD]Dealer A[/TD]
[TD]Mobile phone[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 800"]
<tbody>[TR]
[TD]Dealer[/TD]
[TD]Dealer total count[/TD]
[TD]Day1 count[/TD]
[TD]Day1 product wise count[/TD]
[TD]Day2 count[/TD]
[TD]Day2 product wise count[/TD]
[TD]Day3 count[/TD]
[TD]Day3 product wise count[/TD]
[/TR]
[TR]
[TD]Dealer A[/TD]
[TD]10[/TD]
[TD]6[/TD]
[TD]3-Mobile phone, 2-Laptop, 1-Watch[/TD]
[TD]3[/TD]
[TD]2-Watch, 1-Laptop[/TD]
[TD]1[/TD]
[TD]1-Mobile phone[/TD]
[/TR]
</tbody>[/TABLE]
The product wise count needs to be in a descending order based on the count. Show here is sample data for one dealer (Dealer A), there are 10 dealers in the dataset, and this similar report needs to be generated in a single sheet.
I would highly appreciate your support in automating it in VBA. Thank you in advance.
Regards,
Vinoth