Problem with Criteria using AVERAGEIFS

rotomarty

New Member
Joined
Jul 23, 2008
Messages
28
I have software that captures weights of product running across an in-motion scale. The data includes a time/date stamp for each line. I am trying to average the weights per hour (25 per minute). I have exported the data to Excel and created a table with hourly numbers that represent dates at a specific time. i.e. 8/12/11 19:00 as 40767.7916676504 in A20 and 8/12/11 19:59 as 40767.8332675505 in B20. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
The formula=AVERAGEIFS(Sheet1!$F$2:$F$11530,Sheet1!$E$2:$E$11530,">=A20",Sheet1!$E$2:$E$11530,"<=B20") results in #DIV/0!
<o:p></o:p>
The formula <o:p></o:p>
=AVERAGEIFS(Sheet1!$F$2:$F$11530,Sheet1!$E$2:$E$11530,">=40767.7916676504",Sheet1!$E$2:$E$11530,"<=40767.8332675505") results in 68.08787<o:p></o:p>

Is there a way to use the cell value and avoid typing in every date number? I am not good at VBA so would prefer using the formula bar if possible. Thanks!<o:p></o:p>
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
I have software that captures weights of product running across an in-motion scale. The data includes a time/date stamp for each line. I am trying to average the weights per hour (25 per minute). I have exported the data to Excel and created a table with hourly numbers that represent dates at a specific time. i.e. 8/12/11 19:00 as 40767.7916676504 in A20 and 8/12/11 19:59 as 40767.8332675505 in B20. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
The formula=AVERAGEIFS(Sheet1!$F$2:$F$11530,Sheet1!$E$2:$E$11530,">=A20",Sheet1!$E$2:$E$11530,"<=B20") results in #DIV/0!
<o:p></o:p>
The formula <o:p></o:p>
=AVERAGEIFS(Sheet1!$F$2:$F$11530,Sheet1!$E$2:$E$11530,">=40767.7916676504",Sheet1!$E$2:$E$11530,"<=40767.8332675505") results in 68.08787<o:p></o:p>

Is there a way to use the cell value and avoid typing in every date number? I am not good at VBA so would prefer using the formula bar if possible. Thanks!<o:p></o:p>
Try it like this...

=AVERAGEIFS(Sheet1!$F$2:$F$11530,Sheet1!$E$2:$E$11530,">="&A20,Sheet1!$E$2:$E$11530,"<="&B20)
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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