Thread: Macro Help
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H. Mike H. is offline
external usenet poster
 
Posts: 471
Default Macro Help

Change the data in the first sheet to have the date in a column:
Customer 1 4/4/06 $250.00
Customer 2 4/4/06 $300.00
Customer 3 4/4/06 $1,000.00

Then do a sumproduct in the second sheet:
the $250 in the intersection of "Cust 1" (Colum B) and 4/4/06 (Row 2) would
be:

=SUMPRODUCT((Sheet1!A1:A2500=Sheet2!B1)*(Sheet1!B1 :B2500=Sheet2!A2)*(Sheet1!C1:C2500))

Note you can just say A:A, B:B and C:C if using Excel 2007. Otherwise you
have to have a finite limit to the number of rows.


Cust 1 Cust 2 Cust 3
4/4/2006 $250.00 $300.00 $1,000.00
4/5/2006 $300.00 $100.00 $-
4/6/2006 $75.00 $50.00 $300.00