I have a spreadsheet, named 'data' with 60,000+ rows with financial income data for all clients. Each row is a payment made by/for a client.
Column A is the date, column E is the name, column J is the £amount.
In a seperate sheet I want to create a report to show income received for selected clients within various date ranges.
In the report sheet I have a title for that row in column A, usually the surname, and in column B (B16 in the examples below) I have the name(s) exactly as it/they appear on the data sheet. Where there is only one name in the cell in column B, the following formula works:
=SUM(SUMIFS(data!$J:$J,data!$E:$E,B16,data!$A:$A,">=1/1/2008",data!$A:$A,"<=31/12/2008"))
However where there is more than one name (e.g. when there is a family and I want to show the income for Mr&Mrs) it does not work. I do have a formula that works for multiple names, but this involves putting the names in the formula, e.g.:
=SUM(SUMIFS(data!$J:$J,data!$E:$E,{"Joe Bloggs","Josephine Bloggs"},data!$A:$A,">=1/1/2008",data!$A:$A,"<=31/12/2008"))
I would like a universal formula that will work no matter how many names in the cell in column B. I have tried various formats for the cell in column B, but none seem to work:
{"Joe Bloggs","Josephine Bloggs"}
"Joe Bloggs","Josephine Bloggs"
{'Joe Bloggs','Josephine Bloggs'}
Joe Bloggs,Josephine Bloggs
As the formula works for only one name, I suspect that it is the way the names are listed in B16 that is the problem, rather than the formula itself.
Also, is there any way to further refine this by using the column heading as the year? The above formula are for the column headed '2008', and I would like to further standardise so that the date references the column heading - something like ">=1/1/C1" , where C1 is the column header and then copying the formula into the next column will make it D1 etc.
Thanks in advance! (I am a novice here, so excuse any glaring stupidity or errors!)
Gareth
Bookmarks