Mean between 2 lookedup values

whitealbum

New Member
Joined
Apr 2, 2019
Messages
5
Hi everyone,

I have a 2 row data set with over 100 cells. The first row contains time values, the second row a numeric value.
I have to find 2 given time values in the first row, and the I need to get the mean between the numeric values under the found values. But here is the tricky part: the mean should not only be based on those 2 found numeric values, but also it should include all numeric values between those 2 values.
i work with live data, so all values can change every day.

I used Hlookup to return the 2 numeric values, but I have no idea how to include all those other numeric values between them...to get the mean.

I hope this challenge can be solved by anyone.

Kind regards
 

steve the fish

Well-known Member
Joined
Oct 20, 2009
Messages
7,793
Office Version
365
Platform
Windows
Hi. So the average between the two times? Are the times in order?
 

steve the fish

Well-known Member
Joined
Oct 20, 2009
Messages
7,793
Office Version
365
Platform
Windows
Try this as an example with your times in column A, times in column B and the start time in D2 and end time in E2:

=AVERAGEIFS(B:B,A:A,">="&D2,A:A,"<="&E2)
 

whitealbum

New Member
Joined
Apr 2, 2019
Messages
5
It does return a value, but it is not the mean I am looking for. The mean I got is 1040.
 

Forum statistics

Threads
1,082,244
Messages
5,363,981
Members
400,772
Latest member
solbebe

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top