Finding a maximum with VLOOKUP

R

Russ

I have a set of data time/temperature data with two temperature values
specified at each time point. I am interested in finding the time
point where the difference between this two temperatures reaches a
maximum. For example:

time T1 T2 Delta
0 175 200 25
1 150 200 50
2 100 300 200
3 175 225 50

'time', 'T1', and 'T2' are numerical values while 'Delta' is a formula
calculating the difference between 'T1' and 'T2'.

I would like to develop a lookup function to identify the value of 200
as a maximum and return the time value 2 where this maximum is
reached.

I've tried to use the MAX() as a lookup value in a VLOOKUP() function
but it doesn't seem to work.

Any ideas?

Thanks,
Russ D.
 
T

T. Valko

Ooops!
return the time value 2

I interpreted that as the T2 value.

Just need to change the column reference:

=INDEX(Time_range,MATCH(MAX(Delta_range),Delta_range,0))
 
R

Russ

Ooops!


I interpreted that as the T2 value.

Just need to change the column reference:

=INDEX(Time_range,MATCH(MAX(Delta_range),Delta_range,0))

Thank you! This is exactly what I was looking for.

Russ D.
 
G

Guest

The LOOKUP function requires the lookup_vector be sorted in ascending order.

Even though it works on the posted sample, try replacing the Delta 25 with
210 and see what happens.
 
G

Guest

I think index match would work better than vlookup

=index(Time-range,match(max(Delta_range),Delta_range,0))
 

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

Top