简体   繁体   中英

Excel - SumIF Cell Value is between date range & another Cell is False

Need help writing a formula to do the following

Sum the value of cells that fall withing a specified date range BUT only if the corresponding cell range A3:A21 is False

I have the current formula that handles just the date range comparison.

=SUMIFS(H3:H21,I3:I21,">="&'Essential Info'!A9,I3:I21,"<="&'Essential Info'!B9)
  • Cells A9 on Essential Info handle the date for the start of the week,
  • Cells B9 on Essential Info handle the date for the end of the week,
  • H3:H21 Contains the number values to be added,
  • I3:I21 Contains the Date Values to be compared to A9 & B9 on Essential info.
  • A3:A21 Contains a true or false value based on a tick box.

I am falling over at the "If Cell Range is false" part. Any pointers would be greatly appreciated

尝试在公式的, A3:A21, "false")加上, A3:A21, "false")

使用总和而不是总和:

=Sumproduct((I3:I21>='Essential Info'!A9)*(I3:I21>='Essential Info'!B9)*H3:H21)

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