ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   finding values and displaying adjacent values (https://www.excelbanter.com/excel-worksheet-functions/50047-finding-values-displaying-adjacent-values.html)

willy3211

finding values and displaying adjacent values
 
I have an Excel File that I am trying to pull data from.

I'm dealing with Time, and Temperature.

example:
A B
Time: Temp
13:32 99.6
13:34 99.8
13:36 100.0
.......
14:30 100.0
14:32 99.8

I want to create a macro that will find any value, that is closest to 100,
or is less than 100 down to 99.6. I then want it to list the time adjacent to
that value.
In this example, it would list 13:32, 13:34, 13:36, and 14:30, 14:32...and
so on It would be even better if it would list only 13:34 and 14:32

Note, the colums have up to 5000 rows...and the values will re-occur
throughout. I know how to make a macro...I just need the formula or
formulas!!

HELP!

Thanks,

Will

Faz


Time: Temp
13:32 99.6
13:34 99.8
13:36 100.0
.......
14:30 100.0
14:32 99.8

List all values (out of 5000 rows) for the time when temp is between
99.6 and 100. (Closest to 100 first)

Create an equation in column C, which will be dragged down to the last
row. (I'm assuming you start at row 1, so this is what to put in cell
C1)

=IF(B1100,"",IF(B1<99.6,"",B1))

Also put this in cell D1:

=IF(C1="","",C1)

Create a macro that highlights every row in the table for columns C and
D, sort in descending order by column C, this should give you the list
you are looking for.


--
Faz
------------------------------------------------------------------------
Faz's Profile: http://www.excelforum.com/member.php...o&userid=27830
View this thread: http://www.excelforum.com/showthread...hreadid=475446



All times are GMT +1. The time now is 01:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com