using greater than in hlookup

bsb2013

New Member
Joined
Jul 16, 2010
Messages
31
I have a row C that has a series of increasing revenues. I want to find the first instance where the revenue is greater than a set cost stored in A1 and return the quarter name stored in row B. Is there a way to do this using hlookup? or is there another quick and simple way?
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Having trouble understanding your layout, since you seem to be confused between rows and columns.

Assuming your data is in columns B and C, try the following array formula (confirmed with ctrl+shift+enter):
=INDEX(B1:B100,MATCH(MIN(IF(C1:C100>A1,C1:C100)),C1:C100,0))
 
Upvote 0
In that case, something like this:
=INDEX(A2:Z2,MATCH(MIN(IF(A3:Z3>A1,A3:Z3)),A3:Z3,0))
(ctrl+shift+enter)
 
Upvote 0
I'm now using the match function to find the specific cell(thanks for bringing that to my attention!). Is there a function that calls a specific cell by taking in the row and column numbers of the cell? sort of like in vba when you say cells(row#,column#)
 
Upvote 0
Sounds like you need to use INDEX in conjunction with MATCH. The 2nd and 3rd arguments of INDEX are the row and column.
 
Upvote 0
Back to your original question. Doesn't this standard non-array formula do what you want?

Excel Workbook
ABCDEF
14.5Q4
2Q1Q2Q3Q4Q5Q6
313451215
Look up Quarter
 
Upvote 0
PGC

In trying to make your formula fail (:biggrin:) I discovered that both yours and mine fail if the revenue being searched for is less that the Q1 revenue. In that case we could revert back to Neil's array formula, or make adjustments like this to mine (& yours - unless you have abetter adjustment).

=IF(A1< A3,A2,INDEX(A2:F2,MATCH(A1,A3:F3,1)+1))
 
Upvote 0
PGC

In trying to make your formula fail (:biggrin:) I discovered that both yours and mine fail if the revenue being searched for is less that the Q1 revenue.

I agree, my formula was just as good (bad) as yours. :biggrin:

You are right, the formula must be adjusted, or then use an array formula like Neil's.
 
Upvote 0

Forum statistics

Threads
1,224,548
Messages
6,179,448
Members
452,915
Latest member
hannnahheileen

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