TesseractE
New Member
- Joined
- Nov 30, 2011
- Messages
- 38
I need to be able to find the most recent date value across multiple sheets based on a given input to look up. I've seen a few methods to do this, but I haven't had any luck adapting them to my project, which requires a LOT of flexibility in where this value might be.
Here's what I've got so far:
The list of Sheet Names is held in the array delineated by the following snippet. The Names are in a table that goes from Overview!K17 to Overview!K34 (With "Total" in Overview!K35), but I had to cut out the empty spaces to avoid errors. This will dynamically find the precise range of the names, cutting out those spaces.
D14 is the name that I need to base the search on, and the rest of it is SUPPOSED to search every sheet the name in D14 appears in (in Column G) and return the highest value in Column D (Last Contact Date) from all of those entries.
For example, if you have a contact date of 2/14 in Sheet 1 for 'TesseractE', 1/30 in Sheet 2 for 'TesseractE' and 2/19 in Sheet 3 for 'TesseractE', it will return the value of 2/19.
I'm basing this attempt off of a similar formula that works perfectly well to SUMIF across the multiple sheets:
I know there's no such thing as 'MAXIF', but the 'MAX(IF(' is something I had seen suggested elsewhere.
Any suggestions?
Here's what I've got so far:
Code:
=SUMPRODUCT(MAX(IF(INDIRECT("'"&INDIRECT("'Overview'!$K$17:$K$"&((MATCH("Total",'Overview'!$K$1:$K$100,0)-1)-(COUNTBLANK(INDIRECT("'Overview'!$K$17:$K$"&MATCH("Total",'Overview'!$K$1:$K$100,0))))))&"'!$G$1:$G$1000")=D14,INDIRECT("'"&INDIRECT("'Overview'!$K$17:$K$"&((MATCH("Total",'Overview'!$K$1:$K$100,0)-1)-(COUNTBLANK(INDIRECT("'Overview'!$K$17:$K$"&MATCH("Total",'Overview'!$K$1:$K$100,0))))))&"'!$D$1:$D$1000"))))
The list of Sheet Names is held in the array delineated by the following snippet. The Names are in a table that goes from Overview!K17 to Overview!K34 (With "Total" in Overview!K35), but I had to cut out the empty spaces to avoid errors. This will dynamically find the precise range of the names, cutting out those spaces.
Code:
INDIRECT("'Overview'!$K$17:$K$"&((MATCH("Total",'Overview'!$K$1:$K$100,0)-1)-(COUNTBLANK(INDIRECT("'Overview'!$K$17:$K$"&MATCH("Total",'Overview'!$K$1:$K$100,0))))))
D14 is the name that I need to base the search on, and the rest of it is SUPPOSED to search every sheet the name in D14 appears in (in Column G) and return the highest value in Column D (Last Contact Date) from all of those entries.
For example, if you have a contact date of 2/14 in Sheet 1 for 'TesseractE', 1/30 in Sheet 2 for 'TesseractE' and 2/19 in Sheet 3 for 'TesseractE', it will return the value of 2/19.
I'm basing this attempt off of a similar formula that works perfectly well to SUMIF across the multiple sheets:
Code:
=SUMPRODUCT(SUMIF(INDIRECT("'"&INDIRECT("'Overview'!$K$17:$K$"&((MATCH("Total",'Overview'!$K$1:$K$100,0)-1)-(COUNTBLANK(INDIRECT("'Overview'!$K$17:$K$"&MATCH("Total",'Overview'!$K$1:$K$100,0))))))&"'!$G$1:$G$1000"),D14,INDIRECT("'"&INDIRECT("'Overview'!$K$17:$K$"&((MATCH("Total",'Overview'!$K$1:$K$100,0)-1)-(COUNTBLANK(INDIRECT("'Overview'!$K$17:$K$"&MATCH("Total",'Overview'!$K$1:$K$100,0))))))&"'!$C$1:$C$1000")))
I know there's no such thing as 'MAXIF', but the 'MAX(IF(' is something I had seen suggested elsewhere.
Any suggestions?