find data in column that meets parameter

bergy

Board Regular
Joined
Apr 23, 2002
Messages
115
I have a two columns of data that exists in the range A5:B1199. Column A is time stamps and column B is temperatures. I need to find the first occurrence in column B when the temperature rises above a certain point and then display the corresponding time from column A. Ideally, I want to be able to enter a temperature set point in B2 and then have a formula in B3 that would display the time stamp. I know I could write a macro for this, but I was hoping that someone might know of a way of doing this with a formula.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
sort the entire section (A5:B1199) descending by both A and B (first condition A, then B). this is the formula:

=INDEX(A5:A1199,MATCH(B2,B5:B1199,-1))
 
Upvote 0
That works and I will use that for now, but is there a way without using the sort?

Thanks
 
Upvote 0
Here is one way to do this with a variation - one uses Sumproduct, the other is an array formula confirmed with CSE. Data does not need to be sorted by temp in this case - sulakvea's will work if it is sorted. Expand range to 1199.
Excel Workbook
ABC
1
2959:00:00 PM
39:00:00 PM
4
58:00:00 AM65
69:00:00 AM68
710:00:00 AM71
811:00:00 AM74
912:00:00 PM77
101:00:00 PM80
112:00:00 PM83
123:00:00 PM86
134:00:00 PM84
145:00:00 PM82
156:00:00 PM80
167:00:00 PM87
178:00:00 PM90
189:00:00 PM95
1910:00:00 PM100
2011:00:00 PM98
Sheet4
Excel 2007
Cell Formulas
RangeFormula
C2=INDEX(A5:B20,SUMPRODUCT(MATCH(0,--(B5:B20),0)),1)
#VALUE!
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
 
Upvote 0
Actually, this does work because my data is initially sorted by time (column A), so I can use this with my 'raw' data. Thank you!
 
Upvote 0

Forum statistics

Threads
1,214,982
Messages
6,122,573
Members
449,089
Latest member
Motoracer88

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