MAX/IF and MAXIFS help

%3CLINGO-SUB%20id%3D%22lingo-sub-167359%22%20slang%3D%22en-US%22%3EMAX%2FIF%20and%20MAXIFS%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-167359%22%20slang%3D%22en-US%22%3E%3CP%3EHi!%3C%2FP%3E%0A%3CP%3EI've%20been%20using%20a%20MAX%2FIF%20array%20function%20in%20some%20of%20my%20sheets.%20Recently%20I%20read%20about%20using%20MAXIFS%20instead%2C%20but%20I%20can't%20get%20it%20to%20return%20the%20same%20result%20as%20my%20array.%20I'm%20not%20sure%20what%20I'm%20doing%20wrong.%20Basically%20I%20am%20using%20the%20function%20in%20an%20accounting%20report.%20It%20uses%20a%20store%20number%20to%20filter%20the%20MAX%20result%20from%202%20other%20workbooks%2C%20returning%20the%20date%20of%20the%20most%20recent%20activity%20for%20the%20store.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHere's%20the%20array%3A%3C%2FP%3E%0A%3CP%3E%3DMAX(IF('W%3A%5CCoreData%5C%5Bcore%20data%202018%20YTD.xlsx%5DSheet1'!%24K%3A%24K%3DC2%2C'W%3A%5CCoreData%5C%5Bcore%20data%202018%20YTD.xlsx%5DSheet1'!%24B%3A%24B%2C(IF('W%3A%5CCoreData%5C%5Bcore%20data%20YTD.xlsx%5DSheet1'!%24K%3A%24K%3DC2%2C'W%3A%5CCoreData%5C%5Bcore%20data%20YTD.xlsx%5DSheet1'!%24B%3A%24B))))%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EColumn%20K%20in%20the%20other%20book%20is%20the%20list%20of%20store%20numbers.%20Cell%20C2%20is%20the%20store%20number%20on%20the%20current%20sheet%20that%20is%20being%20used%20as%20a%20filter.%20Column%20B%20in%20the%20other%20book%20is%20the%20list%20of%20dates.%20There%20are%20two%20workbooks%20listed%20in%20the%20function%20because%20if%20the%20store%20is%20not%20found%20in%20the%202018%20book%2C%20it%20looks%20in%20the%202017%20book.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHere's%20the%20MAXIFS%20function%20I'm%20experimenting%20with%3A%3C%2FP%3E%0A%3CP%3E%3DMAXIFS('W%3A%5CCoreData%5C%5Bcore%20data%202018%20YTD.xlsx%5DSheet1'!%24B%3A%24B%2C'W%3A%5CCoreData%5C%5Bcore%20data%202018%20YTD.xlsx%5DSheet1'!%24K%3A%24K%2CC2)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20haven't%20added%20the%20second%20workbook%20to%20the%20MAXIFS%20function%20yet%2C%20as%20I'm%20not%20sure%20how%20to%20incorporate%20it%20into%20an%20IF%20with%20the%20MAXIF.%20That%20problem%20is%20secondary.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20main%20problem%20I'm%20having%20is%20that%20the%20array%20and%20the%20MAXIFS%20are%20returning%20two%20different%20results.%20The%20array%20function%20works%2C%20it's%20just%20slow.%20The%20MAXIFS%20function%20is%20just%20returning%20%22%23VALUE!%22.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-167359%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20%26amp%3B%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ERequests%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-167387%22%20slang%3D%22en-US%22%3ERe%3A%20MAX%2FIF%20and%20MAXIFS%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-167387%22%20slang%3D%22en-US%22%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F124574%22%20target%3D%22_blank%22%3E%40Brian%20Brislenn%3C%2FA%3E%20wrote%3A%3CBR%20%2F%3E%3CP%3EColumn%20K%20in%20the%20other%20book%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3EUsing%20MAXIFS()%20requires%20the%20source%20workbook(s)%20to%20be%20open.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hi!

I've been using a MAX/IF array function in some of my sheets. Recently I read about using MAXIFS instead, but I can't get it to return the same result as my array. I'm not sure what I'm doing wrong. Basically I am using the function in an accounting report. It uses a store number to filter the MAX result from 2 other workbooks, returning the date of the most recent activity for the store.

 

Here's the array:

=MAX(IF('W:\CoreData\[core data 2018 YTD.xlsx]Sheet1'!$K:$K=C2,'W:\CoreData\[core data 2018 YTD.xlsx]Sheet1'!$B:$B,(IF('W:\CoreData\[core data YTD.xlsx]Sheet1'!$K:$K=C2,'W:\CoreData\[core data YTD.xlsx]Sheet1'!$B:$B))))

 

Column K in the other book is the list of store numbers. Cell C2 is the store number on the current sheet that is being used as a filter. Column B in the other book is the list of dates. There are two workbooks listed in the function because if the store is not found in the 2018 book, it looks in the 2017 book.

 

Here's the MAXIFS function I'm experimenting with:

=MAXIFS('W:\CoreData\[core data 2018 YTD.xlsx]Sheet1'!$B:$B,'W:\CoreData\[core data 2018 YTD.xlsx]Sheet1'!$K:$K,C2)

 

I haven't added the second workbook to the MAXIFS function yet, as I'm not sure how to incorporate it into an IF with the MAXIF. That problem is secondary.

 

The main problem I'm having is that the array and the MAXIFS are returning two different results. The array function works, it's just slow. The MAXIFS function is just returning "#VALUE!".

1 Reply
Highlighted

@Brian Brislenn wrote:

Column K in the other book

Using MAXIFS() requires the source workbook(s) to be open.