needtoknownow
New Member
- Joined
- Apr 28, 2013
- Messages
- 17
I need to be able to sum the SALES_UNITS based on two Criteria.
Criteria 1 is the name and criteria 2 is the last 7 days. Could you please help me write a formula using VBA if possible? For example I want to be able to enter the name Mike into Range("C2") on Sheet2! and have the Sum of the sales units for the previous 7 days populate into Range("C3") and the Sum of the 7 day before that populate into Range("C4").
Thank You.
Here is an example of the table (This table updates daily onto Sheet1!)
A B C
<tbody>
</tbody><colgroup><col><col><col></colgroup>
Criteria 1 is the name and criteria 2 is the last 7 days. Could you please help me write a formula using VBA if possible? For example I want to be able to enter the name Mike into Range("C2") on Sheet2! and have the Sum of the sales units for the previous 7 days populate into Range("C3") and the Sum of the 7 day before that populate into Range("C4").
Thank You.
Here is an example of the table (This table updates daily onto Sheet1!)
A B C
REP | APPROVAL_DATE | SALES_UNITS |
Mike | 4/1/2013 0:00 | 21 |
Mike | 4/2/2013 0:00 | 43 |
Mike | 4/3/2013 0:00 | 3 |
Mike | 4/24/2013 0:00 | 2 |
Mike | 4/25/2013 0:00 | 32 |
Mike | 4/27/2013 0:00 | 54 |
Mike | 4/27/2013 0:00 | 23 |
Mike | 4/8/2013 0:00 | 43 |
Mike | 4/9/2013 0:00 | 54 |
Mike | 4/10/2013 0:00 | 23 |
Mike | 4/11/2013 0:00 | 4 |
Mike | 4/12/2013 0:00 | 34 |
James | 4/13/2013 0:00 | 44 |
James | 4/14/2013 0:00 | 43 |
James | 4/15/2013 0:00 | 43 |
James | 4/16/2013 0:00 | 34 |
James | 4/17/2013 0:00 | 32 |
James | 4/18/2013 0:00 | 43 |
James | 4/19/2013 0:00 | 23 |
James | 4/20/2013 0:00 | 5 |
James | 4/21/2013 0:00 | 4 |
James | 4/22/2013 0:00 | 2 |
Kathy | 4/23/2013 0:00 | 3 |
Kathy | 4/24/2013 0:00 | 43 |
Kathy | 4/25/2013 0:00 | 65 |
Kathy | 4/26/2013 0:00 | 34 |
Kathy | 4/27/2013 0:00 | 32 |
Kathy | 4/25/2013 0:00 | 34 |
Kathy | 4/26/2013 0:00 | 54 |
Kathy | 4/26/2013 0:00 | 31 |
Kathy | 4/1/2013 0:00 | 54 |
Kathy | 4/2/2013 0:00 | 76 |
Kathy | 4/3/2013 0:00 | 54 |
Kathy | 4/4/2013 0:00 | 32 |
Kathy | 4/5/2013 0:00 | 32 |
Kathy | 4/6/2013 0:00 | 65 |
Kathy | 4/7/2013 0:00 | 43 |
Kathy | 4/8/2013 0:00 | 32 |
Kathy | 4/9/2013 0:00 | 525 |
Kathy | 4/10/2013 0:00 | 63 |
<tbody>
</tbody><colgroup><col><col><col></colgroup>