SUMPRODUCT help

%3CLINGO-SUB%20id%3D%22lingo-sub-1999952%22%20slang%3D%22en-US%22%3ESUMPRODUCT%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1999952%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3EI'm%20trying%20to%20get%20a%20SUMPRODUCT%20to%20work.%20I%20have%20managed%20to%20get%20it%20working%20using%20the%20formula%20below%20(both%20with%20or%20without%20named%20ranges%20for%20the%20COURSES!K%3AW)%3A%3C%2FP%3E%3CP%3E%3DSUMPRODUCT(COUNTIF(%24D%243%2CCOURSES!E%3AE)*(%24D%244%26lt%3B%3DCOURSES!K%3AW)*(%24D%245%26gt%3B%3DCOURSES!K%3AW))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20when%20I%20try%20and%20change%20the%20cell%20range%20(formula%20below)%20it%20falls%20over%20and%20tells%20me%20there%20is%20either%20a%20spill%20error%20or%20a%20REF%20error.%20I've%20tried%20changing%20to%20a%20named%20range%20at%20that%20still%20won't%20work.%20Really%20struggling!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DSUMPRODUCT(COUNTIF(%24D%243%2CCOURSES!E%3AE)*(%24D%244%26lt%3B%3DCOURSES!X%3AAJ)*(%24D%245%26gt%3B%3DCOURSES!X%3AAJ))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202020-12-17%20at%2022.56.14.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F241471i2AD7DEE4DA9FBFFC%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Screenshot%202020-12-17%20at%2022.56.14.png%22%20alt%3D%22RAW%20data%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ERAW%20data%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202020-12-17%20at%2022.55.17.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F241472iF1188275D62E24A2%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Screenshot%202020-12-17%20at%2022.55.17.png%22%20alt%3D%22Screenshot%202020-12-17%20at%2022.55.17.png%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202020-12-17%20at%2022.55.06.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F241473iD415A9701FFC0F90%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Screenshot%202020-12-17%20at%2022.55.06.png%22%20alt%3D%22Formula%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EFormula%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1999952%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2000491%22%20slang%3D%22en-US%22%3ERe%3A%20SUMPRODUCT%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2000491%22%20slang%3D%22en-US%22%3EOh%2C%20I%20think%20I%20see%20what%20you're%20trying%20to%20do%20now.%20Try%20this%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3DSUMPRODUCT((COURSES!E%3AE%3D%24D%243)*(%24D%244%26lt%3B%3DCOURSES!X%3AAJ)*(%24D%245%26gt%3B%3DCOURSES!X%3AAJ))%3CBR%20%2F%3E%3CBR%20%2F%3EBut%2C%20the%20calculation%20is%20going%20to%20lag%20a%20little%20using%20entire%20column%20references.%20If%20possible%2C%20I%20would%20suggest%20narrowing%20the%20range%20or%20using%20a%20structured%20table%20(structured%20table%20references%20will%20automatically%20update%20when%20you%20expand%20the%20size%20of%20the%20table).%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2000699%22%20slang%3D%22en-US%22%3ERe%3A%20SUMPRODUCT%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2000699%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F675152%22%20target%3D%22_blank%22%3E%40JMB17%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETried%20that%20formula%20and%20still%20no%20luck%20%3CLI-EMOJI%20id%3D%22lia_disappointed-face%22%20title%3D%22%3Adisappointed_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3CP%3EFile%20can%20be%20found%20at%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2F1drv.ms%2Fx%2Fs!AlBXijCQ6SGI5hwK1H7ASOrMeC7M%3Fe%3DxzcvNP%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2F1drv.ms%2Fx%2Fs!AlBXijCQ6SGI5hwK1H7ASOrMeC7M%3Fe%3DxzcvNP%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2001498%22%20slang%3D%22en-US%22%3ERe%3A%20SUMPRODUCT%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2001498%22%20slang%3D%22en-US%22%3EI%20can't%20do%20anything%20in%20that%20file%20(edit%20or%20save%20to%20my%20machine).%20Can%20you%20upload%20it%20here%20(click%20on%20reply%2C%20not%20quick%20reply%2C%20and%20you%20should%20see%20an%20option%20below%20the%20comment%20box%20to%20upload%20a%20file).%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2003823%22%20slang%3D%22en-US%22%3ERe%3A%20SUMPRODUCT%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2003823%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F905775%22%20target%3D%22_blank%22%3E%40lbarraclough%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAt%20least%20two%20issues%3C%2FP%3E%0A%3CP%3E1)%20Within%20second%20range%20you%20have%20%23REF!%20error%2C%20thus%20result%20of%20calculation%20returns%20the%20same%20error%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20509px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F241879i5A1BF140C79DC29F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E2)%20With%20named%20ranges%20all%20range%20in%20formulas%20shall%20be%20of%20the%20same%20size%2C%20when%20it%20works%20(if%20ignore%20above%20error).%20Named%20range%20are%20corrected%20in%20attached%20file.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi

I'm trying to get a SUMPRODUCT to work. I have managed to get it working using the formula below (both with or without named ranges for the COURSES!K:W):

=SUMPRODUCT(COUNTIF($D$3,COURSES!E:E)*($D$4<=COURSES!K:W)*($D$5>=COURSES!K:W))

 

But when I try and change the cell range (formula below) it falls over and tells me there is either a spill error or a REF error. I've tried changing to a named range at that still won't work. Really struggling!

 

=SUMPRODUCT(COUNTIF($D$3,COURSES!E:E)*($D$4<=COURSES!X:AJ)*($D$5>=COURSES!X:AJ))

 

RAW dataRAW dataScreenshot 2020-12-17 at 22.55.17.pngFormulaFormula

4 Replies
Oh, I think I see what you're trying to do now. Try this:

=SUMPRODUCT((COURSES!E:E=$D$3)*($D$4<=COURSES!X:AJ)*($D$5>=COURSES!X:AJ))

But, the calculation is going to lag a little using entire column references. If possible, I would suggest narrowing the range or using a structured table (structured table references will automatically update when you expand the size of the table).

@JMB17 

 

Tried that formula and still no luck

File can be found at https://1drv.ms/x/s!AlBXijCQ6SGI5hwK1H7ASOrMeC7M?e=xzcvNP

I can't do anything in that file (edit or save to my machine). Can you upload it here (click on reply, not quick reply, and you should see an option below the comment box to upload a file).

@lbarraclough 

At least two issues

1) Within second range you have #REF! error, thus result of calculation returns the same error

image.png

2) With named ranges all range in formulas shall be of the same size, when it works (if ignore above error). Named range are corrected in attached file.