Thread: SumProduct
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default SumProduct

Can't the 3rd term inside your SUMPRODUCT ... be simplified to this...
--([Main.xls]Sheet1!$X$2:$X$5000={"2021","2022","2023","2025"})


No. The logic of ISNUMBER(MATCH(...)) is
OR(cell_ref={"2021","2022","2023","2025"})

--([Main.xls]Sheet1!$X$2:$X$5000={"2021","2022","2023","2025"})


Is the same as AND(cell_ref={"2021","2022","2023","2025"})

Since a single cell won't contain all of the variables you'll end up with a
#VALUE! error because the evaluated arrays are not the same size.

Also, on an "off topic" note...
Did you receive the private email I sent you on Sept 2nd?


No, I didn't. What address did you use? biffinpitt is a bogus address. A
good address is:

xl can help at comcast period net

Remove "can" and change the obvious.


--
Biff
Microsoft Excel MVP


"Rick Rothstein (MVP - VB)" wrote in
message ...
Those values are in fact text
If I was to just add the "" around them within
your formula it will still work, correct?


Yes:

=SUMPRODUCT(--(Main!$F$2:$F$5000=A14),--(Main!$F$2:$F$5000<=B14),--(ISNUMBER(MATCH(Main!$X$2:$X$5000,{"2021","2022"," 2023","2025"},0))),Main!$K$2:$K$5000)


Can't the 3rd term inside your SUMPRODUCT, which is this...

--(ISNUMBER(MATCH([Main.xls]Sheet1!$X$2:$X$5000,{"2021","2022","2023","2025"}, 0)))

be simplified to this...

--([Main.xls]Sheet1!$X$2:$X$5000={"2021","2022","2023","2025"})

(since it would occur inside a SUMPRODUCT function)?

Also, on an "off topic" note...
Did you receive the private email I sent you on Sept 2nd?

Rick