reverse lookup but returning multiple values

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
Lets say I have a column like the one below. I want to find out which days had temperature 24 or above. or 24 and below.
So if the user enter

temp = 24

then excel will return these days

25/02/2018
04/07/2016
23/12/2016

Or excel will return all days which had 24 and below? is that possible? Thank you so much.



[TABLE="class: grid, width: 139"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]date[/TD]
[TD]temp[/TD]
[/TR]
[TR]
[TD="align: right"]11/12/2016[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD="align: right"]25/02/2018[/TD]
[TD="align: right"]29[/TD]
[/TR]
[TR]
[TD="align: right"]15/10/2017[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]14/07/2017[/TD]
[TD="align: right"]19[/TD]
[/TR]
[TR]
[TD="align: right"]18/01/2018[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]14/07/2017[/TD]
[TD="align: right"]19[/TD]
[/TR]
[TR]
[TD="align: right"]04/07/2016[/TD]
[TD="align: right"]26[/TD]
[/TR]
[TR]
[TD="align: right"]30/03/2016[/TD]
[TD="align: right"]16[/TD]
[/TR]
[TR]
[TD="align: right"]28/09/2018[/TD]
[TD="align: right"]22[/TD]
[/TR]
[TR]
[TD="align: right"]04/09/2018[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]23/12/2016[/TD]
[TD="align: right"]24[/TD]
[/TR]
[TR]
[TD="align: right"]21/02/2016[/TD]
[TD="align: right"]2[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
You haven't specified what you mean by "excel will return all days which had 24 and below"
Have you considered just using conditional formatting to "return" all the days above or below the specfic temperature.
 
Upvote 0

Book1
ABCD
1datetemp
212/11/20164
32/25/201829iii
410/15/20172
57/14/201719
61/18/20181
77/14/201719
87/4/201626iii
93/30/201616
109/28/201822
119/4/20186
1212/23/201624iii
132/21/20162
14
15
16Temp24
17
18overunder
192/25/201812/11/2016
207/4/201610/15/2017
2112/23/20167/14/2017
22 1/18/2018
23 7/14/2017
24 3/30/2016
25 9/28/2018
26 9/4/2018
27 12/23/2016
28 2/21/2016
29  
30  
31  
32
Sheet1
Cell Formulas
RangeFormula
B19{=IF(ROWS(B$19:B19)>COUNTIF($B$2:$B$13,">="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13>=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B19))))}
B20{=IF(ROWS(B$19:B20)>COUNTIF($B$2:$B$13,">="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13>=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B20))))}
B21{=IF(ROWS(B$19:B21)>COUNTIF($B$2:$B$13,">="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13>=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B21))))}
B22{=IF(ROWS(B$19:B22)>COUNTIF($B$2:$B$13,">="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13>=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B22))))}
B23{=IF(ROWS(B$19:B23)>COUNTIF($B$2:$B$13,">="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13>=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B23))))}
B24{=IF(ROWS(B$19:B24)>COUNTIF($B$2:$B$13,">="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13>=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B24))))}
B25{=IF(ROWS(B$19:B25)>COUNTIF($B$2:$B$13,">="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13>=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B25))))}
B26{=IF(ROWS(B$19:B26)>COUNTIF($B$2:$B$13,">="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13>=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B26))))}
B27{=IF(ROWS(B$19:B27)>COUNTIF($B$2:$B$13,">="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13>=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B27))))}
B28{=IF(ROWS(B$19:B28)>COUNTIF($B$2:$B$13,">="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13>=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B28))))}
B29{=IF(ROWS(B$19:B29)>COUNTIF($B$2:$B$13,">="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13>=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B29))))}
B30{=IF(ROWS(B$19:B30)>COUNTIF($B$2:$B$13,">="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13>=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B30))))}
B31{=IF(ROWS(B$19:B31)>COUNTIF($B$2:$B$13,">="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13>=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B31))))}
D19{=IF(ROWS(B$19:B19)>COUNTIF($B$2:$B$13,"<="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13<=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B19))))}
D20{=IF(ROWS(B$19:B20)>COUNTIF($B$2:$B$13,"<="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13<=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B20))))}
D21{=IF(ROWS(B$19:B21)>COUNTIF($B$2:$B$13,"<="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13<=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B21))))}
D22{=IF(ROWS(B$19:B22)>COUNTIF($B$2:$B$13,"<="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13<=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B22))))}
D23{=IF(ROWS(B$19:B23)>COUNTIF($B$2:$B$13,"<="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13<=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B23))))}
D24{=IF(ROWS(B$19:B24)>COUNTIF($B$2:$B$13,"<="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13<=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B24))))}
D25{=IF(ROWS(B$19:B25)>COUNTIF($B$2:$B$13,"<="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13<=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B25))))}
D26{=IF(ROWS(B$19:B26)>COUNTIF($B$2:$B$13,"<="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13<=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B26))))}
D27{=IF(ROWS(B$19:B27)>COUNTIF($B$2:$B$13,"<="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13<=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B27))))}
D28{=IF(ROWS(B$19:B28)>COUNTIF($B$2:$B$13,"<="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13<=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B28))))}
D29{=IF(ROWS(B$19:B29)>COUNTIF($B$2:$B$13,"<="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13<=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B29))))}
D30{=IF(ROWS(B$19:B30)>COUNTIF($B$2:$B$13,"<="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13<=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B30))))}
D31{=IF(ROWS(B$19:B31)>COUNTIF($B$2:$B$13,"<="&$B$16),"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13<=$B$16,ROW($B$2:$B$13)-ROW($B$2)+1),ROWS(B$19:B31))))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,217
Members
452,619
Latest member
Shiv1198

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