Excel 2003 Function Help

R

Ryan Hicks

I need help coming up will a function that will average a range in one column
based on if the hours match. Here is my set up.

-------A-------B
1.....09:21....12
2.....09:46....24
3.....09:57....17
4.....10:04....22

I need to average column B if column A's hour is the same as the hour in a
cell in another worksheet.
 
L

Luke M

This is an array* function
=AVERAGE(IF(HOUR(A2:A10)=HOUR(C3),B2:B10))

*Array functions must be confirmed using Ctrl+Shift+Enter, not just Enter.
 
F

Fred Smith

=SUMPRODUCT(B1:B4,--(HOUR(A1:A4)=Sheet2!A1))/SUMPRODUCT(--(HOUR(A1:A4)=Sheet2!A1))
Adjust the range for the "cell in another worksheet" to suit.

Regards,
Fred
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

vlookup or Match 6
Complex Look Up 4
Complex Look Up (amended) 2
macro help 1
Pvtbl Grouping: Time Duration 3
vlookup help? 7
LOOKUP function between two dates in Excel 2007 6
Pls help for Simple Calculation 1

Top