简体   繁体   中英

SUMIF Array Formula with "GREATER THAN"

I know this may work:

=ArrayFormula(sum(SUMIF(D2:D9&F2:F9,J2:J3&H2,E2:E9)))

But I don't know how to find any solution for this

=ArrayFormula(sum(SUMIF(D2:D9&F2:F9,J2:J3&(">"&H2),E2:E9)))

Basically, I want to SUMIF with multiple criterias with array formula. But I can't find a way with criteria that greater than something

this is the sample case: https://docs.google.com/spreadsheets/d/1lyPSurAudZOAn2HHGPaKcgmwso46f3K4dVYA6dwlDjM/edit#gid=0

the case is about summing the quantity given from each activity, given some range of date.

  1. array formula is needed since I want the list of activity to be flexibly added, without me having to edit the formula.
  2. as far as I know, sumifs cant be used because sumifs doesn't work with array formula

try:

=ARRAYFORMULA(SUM(IF((F2:F>H2)*(REGEXMATCH(D2:D, 
 TEXTJOIN("|", 1, J2:J))), E2:E, )))

0

or try:

=SUM(FILTER(E2:E, REGEXMATCH(D2:D, TEXTJOIN("|", 1, J:J)), F2:F>H2))

0

Some alternative:

sumif and vlookup==>

=arrayformula(sumif((1-isna(vlookup(D2:D9,J2:J3,1)))*F2:F9,">" & H2,E2:E9))

sum if and vlookup:

=arrayformula(sum(if((1-isna(vlookup(D2:D9,J2:J3,1)))*F2:F9>H2,E2:E9,0)))

Sum and vlookup:

=arrayformula(sum((iferror(vlookup(D2:D9,J2:J3,1),"")=D2:D9)*(F2:F9>H2)*E2:E9))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM