Home

Using a specific cell to reference table name in a minifs or maxifs funtion

%3CLINGO-SUB%20id%3D%22lingo-sub-355842%22%20slang%3D%22en-US%22%3EUsing%20a%20specific%20cell%20to%20reference%20table%20name%20in%20a%20minifs%20or%20maxifs%20funtion%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-355842%22%20slang%3D%22en-US%22%3E%3CP%3EGood%20afternoon%20all%2C%20I%20have%20developed%20a%20spreadsheet%20to%20be%20used%20for%20several%20users%20with%20different%20excel%20versions%20and%20not%20being%20able%20to%20update%20to%20latest%20one.%20In%20this%20spreadsheet%20I%20have%20several%20MINIFS%2C%20MAXIFS%20to%20substract%20info%20from%20a%20large%20set%20of%20data.%20The%20MINIFS%2C%20MAXIFS%20formulas%20are%20located%20in%20other%20sheets%20that%20summarize%20the%20values%20in%20the%20first%20data%20set.%20In%20some%20of%20the%20users%20computers%20these%20formulas%20don%C2%B4t%20work%2C%20I%C2%B4m%20trying%20to%20find%20a%20workaround%20to%20develop%20same%20MINIFS%2C%20MAXIFS%20results%20without%20being%20necessary%20to%20use%20those%20formulas%2C%20but%20haven%C2%B4t%20been%20able%20to.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20my%20original%20formula%3A%3C%2FP%3E%3CP%3EMAXIFS(SS!%24C%2418%3A%24C%243001%2CSS!%24A%2418%3A%24A%243001%2CI5)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%C2%B4ve%20tried%20this%20workaround%3A%3C%2FP%3E%3CP%3EMAX(IF(SS!A18%3AA3001%3DI5%2CSS!C18%3AC3001%2C%22%22))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20it%20returns%20a%20%23VALUE%20error%2C%20can%20you%20please%20help%20me%20solve%20this%3F%20I%20believe%20if%20I%20find%20the%20way%20to%20make%20it%20work%20with%20MAXIFS%2C%20I%C2%B4ll%20be%20able%20to%20make%20it%20work%20with%20MINIFS.%20If%20this%20helps%2C%20I%20have%20a%20cell%20format%20DATE%20in%20C%20column%20data.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20really%20appreciate%20your%20help%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELaura%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-355842%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-355972%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20a%20specific%20cell%20to%20reference%20table%20name%20in%20a%20minifs%20or%20maxifs%20funtion%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-355972%22%20slang%3D%22en-US%22%3E%3CP%3EI'd%20prefer%20for%20MAX%3C%2FP%3E%0A%3CPRE%3E%3DAGGREGATE(14%2C6%2C1%2F(SS!%24A%2418%3A%24A%243001%3DI5)*SS!%24C%2418%3A%24C%243001%2C1)%3C%2FPRE%3E%0A%3CP%3Eand%20for%20MIN%3C%2FP%3E%0A%3CPRE%3E%3DAGGREGATE(15%2C6%2C1%2F(SS!%24A%2418%3A%24A%243001%3DI5)*SS!%24C%2418%3A%24C%243001%2C1)%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-355882%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20a%20specific%20cell%20to%20reference%20table%20name%20in%20a%20minifs%20or%20maxifs%20funtion%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-355882%22%20slang%3D%22en-US%22%3EHello%20again%20Laura%2C%3CBR%20%2F%3EInstead%20of%20MINIFS%2C%20you%20can%20use%20this%20formula%3A%3CBR%20%2F%3E%3DLOOKUP(PI()%2C2%2F(1%2FSS!C18%3AC3001%3DMAX(INDEX(1%2FSS!C18%3AC3001*(SS!A18%3AA3001%3D15)%2C0)))%2CSS!C18%3AC3001)%3CBR%20%2F%3EI%20should%20have%20used%203%20as%20the%20lookup_value%20argument%20but%20I%20chose%20PI()%20just%20to%20make%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1639%22%20target%3D%22_blank%22%3E%40Detlef%20Lewin%3C%2FA%3E%20smile%20at%20my%20formula%20again!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-355864%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20a%20specific%20cell%20to%20reference%20table%20name%20in%20a%20minifs%20or%20maxifs%20funtion%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-355864%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20again!!!%20Thanks%20for%20the%20quick%20reply.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20column%20C%20in%20the%20sheet%20SS%20has%20Date%20data%2C%20each%20row%20is%20being%20calculated%20from%20previous%20rows.%20I%20found%20the%20problem%2C%20C%20column%20formula%20not%20only%20returns%20a%20number%20but%20also%20%22%22%2C%20since%20the%20column%20has%20both%20numbers%20and%20%22%22%20results%2C%20that%C2%B4s%20where%20the%20%23VALUE%20appears.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20eliminated%20that%20%22%22%20conditional%20in%20the%20formulas%20in%20column%20C%20and%20your%20workaround%20is%20OK%20to%20replace%20MAXIFS%2C%20but%20not%20for%20MINIFS.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20MINIFS%20I%20used%3A%3C%2FP%3E%3CP%3E%3DINDEX(SS!%24C%2418%3A%24C%243001%2CMATCH(I5%2CSS!%24A%2418%3A%24A%243001%2C0))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20worked%2C%20eliminating%20the%20%22%22%20values%20both%20formulas%20worked%20fine.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELaura%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-355861%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20a%20specific%20cell%20to%20reference%20table%20name%20in%20a%20minifs%20or%20maxifs%20funtion%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-355861%22%20slang%3D%22en-US%22%3EHi%20Laura%2C%3CBR%20%2F%3EI%20tested%20the%202%20formulas%20I%20suggested%20and%20both%20worked.%20I%20can%E2%80%99t%20believe%20your%20claim%20that%20both%20returned%20errors.%20Perhaps%20something%20is%20wrong%20with%20your%20data%20in%20Column%20C.%20Please%20check.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-355852%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20a%20specific%20cell%20to%20reference%20table%20name%20in%20a%20minifs%20or%20maxifs%20funtion%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-355852%22%20slang%3D%22en-US%22%3EGood%20Night%2C%20thanks%20for%20the%20answers.%20I%C2%B4ve%20tried%20both%20and%20both%20of%20them%20give%20me%20%23VALUE%20responses...%3CBR%20%2F%3EAny%20other%20suggestion%3F%20I%C2%B4ve%20read%20about%20a%20combination%20of%20index%20and%20match%20but%20haven%C2%B4t%20found%20the%20proper%20syntax%20to%20obtain%20my%20results.%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20again!!!%3CBR%20%2F%3E%3CBR%20%2F%3ELaura%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-355848%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20a%20specific%20cell%20to%20reference%20table%20name%20in%20a%20minifs%20or%20maxifs%20funtion%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-355848%22%20slang%3D%22en-US%22%3EHello%20Lauri%2C%3CBR%20%2F%3EYou%20may%20use%20any%20of%20these%20formulas%3A%3CBR%20%2F%3E1.%20%3DMAX(INDEX(SS!C18%3AC3001*(SS!A18%3AA3001%3D15)%2C0))%3CBR%20%2F%3E2.%20%3DSUMPRODUCT(MAX(SS!C18%3AC3001*(SS!A18%3AA3001%3D15)))%3C%2FLINGO-BODY%3E
Lauri_Perico
New Contributor

Good afternoon all, I have developed a spreadsheet to be used for several users with different excel versions and not being able to update to latest one. In this spreadsheet I have several MINIFS, MAXIFS to substract info from a large set of data. The MINIFS, MAXIFS formulas are located in other sheets that summarize the values in the first data set. In some of the users computers these formulas don´t work, I´m trying to find a workaround to develop same MINIFS, MAXIFS results without being necessary to use those formulas, but haven´t been able to.

 

This is my original formula:

MAXIFS(SS!$C$18:$C$3001,SS!$A$18:$A$3001,I5)

 

I´ve tried this workaround:

MAX(IF(SS!A18:A3001=I5,SS!C18:C3001,""))

 

And it returns a #VALUE error, can you please help me solve this? I believe if I find the way to make it work with MAXIFS, I´ll be able to make it work with MINIFS. If this helps, I have a cell format DATE in C column data.

 

I would really appreciate your help,

 

 

Regards,

 

Laura

6 Replies
Hello Lauri,
You may use any of these formulas:
1. =MAX(INDEX(SS!C18:C3001*(SS!A18:A3001=15),0))
2. =SUMPRODUCT(MAX(SS!C18:C3001*(SS!A18:A3001=15)))
Good Night, thanks for the answers. I´ve tried both and both of them give me #VALUE responses...
Any other suggestion? I´ve read about a combination of index and match but haven´t found the proper syntax to obtain my results.

Thanks again!!!

Laura
Hi Laura,
I tested the 2 formulas I suggested and both worked. I can’t believe your claim that both returned errors. Perhaps something is wrong with your data in Column C. Please check.

Hello again!!! Thanks for the quick reply.

 

My column C in the sheet SS has Date data, each row is being calculated from previous rows. I found the problem, C column formula not only returns a number but also "", since the column has both numbers and "" results, that´s where the #VALUE appears.

 

I eliminated that "" conditional in the formulas in column C and your workaround is OK to replace MAXIFS, but not for MINIFS.

 

For MINIFS I used:

=INDEX(SS!$C$18:$C$3001,MATCH(I5,SS!$A$18:$A$3001,0))

 

It worked, eliminating the "" values both formulas worked fine.

 

Thanks again!

 

Laura

Hello again Laura,
Instead of MINIFS, you can use this formula:
=LOOKUP(PI(),2/(1/SS!C18:C3001=MAX(INDEX(1/SS!C18:C3001*(SS!A18:A3001=15),0))),SS!C18:C3001)
I should have used 3 as the lookup_value argument but I chose PI() just to make @Detlef Lewin smile at my formula again!

I'd prefer for MAX

=AGGREGATE(14,6,1/(SS!$A$18:$A$3001=I5)*SS!$C$18:$C$3001,1)

and for MIN

=AGGREGATE(15,6,1/(SS!$A$18:$A$3001=I5)*SS!$C$18:$C$3001,1)
Related Conversations
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
2 Replies
Early preview of Microsoft Edge group policies
Sean Lyndersay in Discussions on
65 Replies
*Updated 9/3* Syncing in Microsoft Edge Preview Channels
Elliot Kirk in Articles on
202 Replies