Forum Discussion
Jamesboden
Sep 08, 2022Copper Contributor
Formula for adding certain cells
Hey Folks Not sure if this is possible. I need a formula that will add cells together depending on what is put in another cell. So if in A it says 1 - I need to add up all the amounts in C tha...
HansVogelaar
Sep 08, 2022MVP
Jamesboden
Sep 08, 2022Copper Contributor
Hey Hans. Thats great thank you. Would you know how to add a date range to it. so 01/08 to 31/08?
- HansVogelaarSep 08, 2022MVP
Let's say you have dates in column D. This time, we'll use SUMIFS:
=SUMIFS(C1:C100, A1:A100, 1, D1:D100, ">="&DATE(2022, 8, 1), D1:D100, "<="&DATE(2022, 8, 31))
Instead of including the literal dates in the formula, you can refer to cells - say K1 contains 01/08/2022 and K2 contains 31/08/2022:
=SUMIFS(C1:C100, A1:A100, 1, D1:D100, ">="&K1, D1:D100, "<="&K2)
- JamesbodenSep 08, 2022Copper ContributorThis is coding I'm trying to use but I'm getting an error
=SUMIFS(Data!C1:C100,Data!AM1:AM100,"Asda - Cable Maintenance",Data!$E:$E,">="&$S$1,Data!$E:$E,"<="&$T$1)- HansVogelaarSep 08, 2022MVP
All ranges must be the same size, so
=SUMIFS(Data!$C$1:$C$100,Data!$AM$1:$AM$100,"Asda - Cable Maintenance",Data!$E$1:$E$100,">="&$S$1,Data!$E$1:$E$100,"<="&$T$1)