Thread: ?? VLookup ??
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default ?? VLookup ??

Are those months and years in sheet2 in Excel date format with the
cell formatted to show just the month and date, or are they text
values? If the former then you can use something like this in cell C2
of Sheet2:

=SUMPRODUCT((Sheet1!A:A=A2)*(MONTH(Sheet1!B:B)=MON TH(B2))*(YEAR(Sheet1!
B:B)=YEAR(B2)*(Sheet1!C:C))

You can use full-column references with Sumproduct in Excel 2007.

Copy this down as required.

Hope this helps.

Pete

On May 30, 12:51*am, Charles
wrote:
I am using Excel 2007 with which I have 2 spreadsheets, spreadsheet 1 has 3
columns, “Customer name”, “Date” and “Amount”, each customer may have several
entries *for any given month and the date field goes back several years.

Spreadsheet 2 *lists all the customer names from spreadsheet 1 in column A,
and the other columns have a month and year i.e. Dec 07, Jan 08, Feb 08 etc.

What I need to do is create a formula in spreadsheet 2 that will sum all the
customer entries for each month. I thought VLookup would work but I can’t
figure out how to make it work with the month requirement.

Thanks for your help