How do I get the sum of data from multiple sheets based on a certain criteria to a summary sheet, either using formula or vba?
For example
Currently I have two worksheets but this can go up to 13 or 15 worksheets, I want the sum to be shown on summary sheet (sumsheet) for each week separately and the row count for each worksheet will differ.
Worksheet (Data1) has
[TABLE="width: 348"]
<tbody>[TR]
[TD]Date
[/TD]
[TD]Name
[/TD]
[TD]Qty
[/TD]
[TD]Week
[/TD]
[/TR]
[TR]
[TD]2-Jan-15
[/TD]
[TD]Tim
[/TD]
[TD]25
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]2-Jan-15
[/TD]
[TD]Tom
[/TD]
[TD]54
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]3-Jan-15
[/TD]
[TD]James
[/TD]
[TD]34
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]4-Jan-15
[/TD]
[TD]Jack
[/TD]
[TD]77
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]5-Jan-15
[/TD]
[TD]Eric
[/TD]
[TD]19
[/TD]
[TD]2
[/TD]
[/TR]
</tbody>[/TABLE]
Worksheet (Data2) has
[TABLE="width: 354"]
<tbody>[TR]
[TD]Date
[/TD]
[TD]Name
[/TD]
[TD]Qty
[/TD]
[TD]Week
[/TD]
[/TR]
[TR]
[TD]5-Jan-15
[/TD]
[TD]Tim
[/TD]
[TD]77
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]6-Jan-15
[/TD]
[TD]Tom
[/TD]
[TD]54
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]21-Jan-15
[/TD]
[TD]Patrick
[/TD]
[TD]44
[/TD]
[TD]7
[/TD]
[/TR]
[TR]
[TD]7-Jan-15
[/TD]
[TD]James
[/TD]
[TD]34
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]8-Jan-15
[/TD]
[TD]Jack
[/TD]
[TD]25
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]14-Jan-15
[/TD]
[TD]Tim
[/TD]
[TD]12
[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]5-Jan-15
[/TD]
[TD]Eric
[/TD]
[TD]36
[/TD]
[TD]2
[/TD]
[/TR]
</tbody>[/TABLE]
Worksheet (sumsheet) were the “1”, “2” …. Stands for the week
[TABLE="width: 236"]
<tbody>[TR]
[TD]1
[/TD]
[TD]Total Qty
[/TD]
[/TR]
[TR]
[TD]Tim
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]Tom
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]James
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]Jack
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]Eric
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]Patric
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]Total Qty
[/TD]
[/TR]
[TR]
[TD]Tim
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]Tom
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]James
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]Jack
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]Eric
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]Patric
[/TD]
[TD]
[/TD]
[/TR]
</tbody>[/TABLE]
For example
Currently I have two worksheets but this can go up to 13 or 15 worksheets, I want the sum to be shown on summary sheet (sumsheet) for each week separately and the row count for each worksheet will differ.
Worksheet (Data1) has
[TABLE="width: 348"]
<tbody>[TR]
[TD]Date
[/TD]
[TD]Name
[/TD]
[TD]Qty
[/TD]
[TD]Week
[/TD]
[/TR]
[TR]
[TD]2-Jan-15
[/TD]
[TD]Tim
[/TD]
[TD]25
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]2-Jan-15
[/TD]
[TD]Tom
[/TD]
[TD]54
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]3-Jan-15
[/TD]
[TD]James
[/TD]
[TD]34
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]4-Jan-15
[/TD]
[TD]Jack
[/TD]
[TD]77
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]5-Jan-15
[/TD]
[TD]Eric
[/TD]
[TD]19
[/TD]
[TD]2
[/TD]
[/TR]
</tbody>[/TABLE]
Worksheet (Data2) has
[TABLE="width: 354"]
<tbody>[TR]
[TD]Date
[/TD]
[TD]Name
[/TD]
[TD]Qty
[/TD]
[TD]Week
[/TD]
[/TR]
[TR]
[TD]5-Jan-15
[/TD]
[TD]Tim
[/TD]
[TD]77
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]6-Jan-15
[/TD]
[TD]Tom
[/TD]
[TD]54
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]21-Jan-15
[/TD]
[TD]Patrick
[/TD]
[TD]44
[/TD]
[TD]7
[/TD]
[/TR]
[TR]
[TD]7-Jan-15
[/TD]
[TD]James
[/TD]
[TD]34
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]8-Jan-15
[/TD]
[TD]Jack
[/TD]
[TD]25
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]14-Jan-15
[/TD]
[TD]Tim
[/TD]
[TD]12
[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]5-Jan-15
[/TD]
[TD]Eric
[/TD]
[TD]36
[/TD]
[TD]2
[/TD]
[/TR]
</tbody>[/TABLE]
Worksheet (sumsheet) were the “1”, “2” …. Stands for the week
[TABLE="width: 236"]
<tbody>[TR]
[TD]1
[/TD]
[TD]Total Qty
[/TD]
[/TR]
[TR]
[TD]Tim
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]Tom
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]James
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]Jack
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]Eric
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]Patric
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]Total Qty
[/TD]
[/TR]
[TR]
[TD]Tim
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]Tom
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]James
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]Jack
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]Eric
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]Patric
[/TD]
[TD]
[/TD]
[/TR]
</tbody>[/TABLE]