Forum Discussion
Mo_Islam00
Aug 06, 2020Copper Contributor
Avergae of Date range
Hello, I have two columns of dates and I need to be able to work out the total average without adding an additional helper column. Also, I need the formula to not count blank cells. E.g ...
- Aug 06, 2020
Previous variant works if only blanks are at the end of second column. More simple and more reliable variant shall work if in the middle as well:
with
=AVERAGE(IF(B2:B100=0,"",B2:B100-A2:A100))You may expand by dynamic ranges based on column A as in previous formula.
SergeiBaklan
Aug 06, 2020Diamond Contributor
Previous variant works if only blanks are at the end of second column. More simple and more reliable variant shall work if in the middle as well:
with
=AVERAGE(IF(B2:B100=0,"",B2:B100-A2:A100))
You may expand by dynamic ranges based on column A as in previous formula.
Mo_Islam00
Aug 06, 2020Copper Contributor
Aah, great. thank you for double checking. You are right, previous only works with the last being empty, however this formula works perfectly.
- SergeiBaklanAug 06, 2020Diamond Contributor
Mo_Islam00 , you are welcome