Lowest value greater than or equal to in an array

Adam1988

New Member
Joined
Oct 1, 2015
Messages
8
Hi all,

Hoping you can help.

I have a 2 variable data table that has 10 rows of data and 8 columns. I have a value that I want to look up in the array and return the lowest value that is greater than or equal to the number that I want to look up. I found a way to do this within a column, but not within an array. I imagine there is a way to do with with index(match(, but I can't seem to figure it out or find an existing thread that addresses this.

I have posted a simplified example in the table below

For this example, the value that I want to look up is 100. The formula I am trying to create should return "Column 1" "Row 2" as the lowest value in the array that is greater than or equal to 100 is 105. For the results, I do not care if "Column 1" "Row 2" are returned in a single cell or in two adjacent cells.

If the lookup value is 107, the result should be "Column 2" "Row 3"

FormulaColumn 1Column 2
Row 199106
Row 210580
Row 388110

<tbody>
</tbody>

Any help is greatly appreciated!

Thanks,
Adam1988
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi.

It's not clear whether you want the row and column positions relative to the range in question or to the worksheet itself. For example, if your data was in D4:G6, and the closest match was in G4, would you want:

"Column 4, Row 1" (relative to range)

or:

"Column 7, Row 4" (relative to worksheet)

?

Presuming the former:

=IF(COUNTIF(Range,">="&MyValue),"Column "&1+MOD(MATCH(1,FREQUENCY(MyValue,Range),0)-1,COLUMNS(Range))&", Row "&1+INT((MATCH(1,FREQUENCY(MyValue,Range),0)-1)/COLUMNS(Range)),"No Solution")

where clearly you should replace both Range and MyValue appropriately.

Regards
 
Upvote 0
XOR LX,

Thank you for the reply!

I'm afraid I was a little unclear with what I was asking... labeling my rows/columns as column 1,2,3 and row 1,2,3 was not the best idea.


ABC
1ApplesOranges
2199106
3210580
4388110

<tbody>
</tbody>

In the example, I have an array of data with column labels in cells B1:C1 (Apples, Oranges) the and row labels in cells A2:A4 (1, 2, 3).

The lookup value is in Cell D2

Lookup value = 100; Result = Apples x2
Lookup value = 107; Result = Oranges x3



Thanks again for any help!

Adam1988
 
Upvote 0
Indeed! That's not at all like your first example!

=IF(COUNTIF(B2:C4,">="&D2),INDEX(B1:C1,1+MOD(MATCH(1,FREQUENCY(D2,B2:C4),0)-1,COLUMNS(B2:C4)))&" x"&INDEX(A2:A4,1+INT((MATCH(1,FREQUENCY(D2,B2:C4),0)-1)/COLUMNS(B2:C4))),"No Solution")

Regards
 
Upvote 0

Forum statistics

Threads
1,216,737
Messages
6,132,430
Members
449,728
Latest member
sanamali

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