Find column header based on row value

rtlane84

New Member
Joined
Jun 18, 2021
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Any help would be appreciated
I have a table like this:

2468
1001.52.22.83.1
2001.11.72.73.2
3001.82.63.53.9
4001.62.13.34.4

I have a lookup value for column A already. I want to find the column header for the first value found that's greater than or equal to 2. For example, if my lookup is 400, then I want to return the column header 4 since 2.1 if the first value greater than or equal to 2.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi & welcome to MrExcel.
How about
+Fluff 1.xlsm
ABCDEFGH
12468
21001.52.22.83.12006
32001.11.72.73.2
43001.82.63.53.9
54001.62.13.34.4
Master
Cell Formulas
RangeFormula
H2H2=INDEX(B1:E1,AGGREGATE(15,6,(COLUMN(B1:E1)-COLUMN(B1)+1)/(INDEX(B2:E5,MATCH(G2,A2:A5,0),0)>2),1))
 
Upvote 0
Thank you Fluff that worked perfectly. Can you break this down for me? The main part I'm hung up on it the array portion of the aggregate formula...(COLUMN(B1:E1)-COLUMN(B1)+1)/(INDEX(B2:E5,MATCH(G2,A2:A5,0),0)>2)
 
Upvote 0
The first part gives an array of numbers
{1,2,3,4}

The index/match returns the values in the found row
{1.1,1.7,2.7,3.2}

which is check to see if its greater than 2 & gives an array of true /false
{FALSE,FALSE,TRUE,TRUE}

The 1st array is then divided by that array to give
{#DIV/0!,#DIV/0!,3,4}

and the aggregate function then returns the smallest number ignoring errors
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,183
Members
452,615
Latest member
bogeys2birdies

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