Averaging between 2 dates

bresab

Board Regular
Joined
Oct 28, 2008
Messages
53
Hi all
I am trying to average a range which is determined by 2 dates manually entered into cell B1(Start Date) B2(End Date)
the dates are in Column A and the Range is B6:T269)

the formula I created below works but not if any of the cells in the range are blank. I want to find the average if any cells are blank, I have tried to use Averageif "<>0" in the formula but seem to get a VALUE error. I would be grateful if someone could help me on this matter

Thanks

=AVERAGE(IF((A6:A269>=B1)*(A6:A269<=B2),B6:T269))
 
Last edited:

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Not sure if I'm following 100%, but seems like you are trying for this maybe?

{=AVERAGE(IF((A6:A269>=B1)*(A6:A269<=B2)*(A6:A269<>""),B6:T269))}
 
Upvote 0
Are you sure that the cells are blank and not formulas returning ""?
 
Upvote 0
I apologise my stupidity I shouldn't have posted thread without checking my data first
 
Upvote 0
I apologise my stupidity I shouldn't have posted thread without checking my data first
Hey, it is not stupidity we get this all the time where empty strings are described as blank cells.

Obviously if you can convert the cells to values then a straightforward Average is the most efficient option but if not then there are various formula alternatives.

You just need to tell us if you need the other options :biggrin:
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,252
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top