Reputation: 31
I have data of temperature in a table which shows the temperature of day time(09:00-21:00) and night time(21:00-09:00) for 15 days. I want to get the temperature for any datetime value based on the table I have.
I want to know the temperature for a particular date time value
I have tried to use vlookup function =VLOOKUP(A2,F1:H31,3,0) in B2 cell but it does not helped me. I have attached file here
Upvotes: 0
Views: 331
Reputation: 3064
You can use MAXIFS
to find the temperature where your specified datetime falls between the "from" and "To" values:
=MAXIFS($H$2:$H$16,$F$2:$F$16,"<" & $A2,$G$2:$G$16,">=" & $A2)
Upvotes: 2