Jan 20 2022 07:27 AM
Hey guys,
I'm looking to count the total amount of days between a lot of dates. but only if in another column a certain value is given.
For example
A 1-12-2020 31-06-2021
B 1-03-2021 5-05-2021
A 1-04-2018 10-08-2020
In this situation I would like to know the total amount of days between the dates with A in front of them. How do I do this?
Thanks in advance!
Jan 20 2022 07:47 AM
=SUMPRODUCT((A2:A8="A")*(C2:C8-B2:B8))
Maybe with this formula as shown in the attached file.
Jan 20 2022 07:50 AM - edited Jan 20 2022 08:01 AM
Hey Quadruple_Pawn,
Thanks for your reply!
Somehow it doesn't work for me, it gives me a value error when I use:
=SUMPRODUCT((B:B=S4)*(I:I-E:E))
Jan 20 2022 08:08 AM
Jan 20 2022 08:16 AM
=SUMPRODUCT((B:B="S4")*(I:I-E:E)
It works in my spreadsheet if i enter "S4" instead of S4 in the formula.
Jan 21 2022 03:10 AM
Jan 21 2022 03:15 AM