Look up column header

jonnyd

New Member
Joined
Feb 18, 2005
Messages
5
Hi, I'm sure this is quite simple and I'm just not understanding the various lookup functions but here's my problem:

I have a number of columns with headers, and a tax rate in the cell below the header. I need to create a formula that will return the tax rate depending on the which column has an entry so e.g.

row 1 has column headers for 5 columns
row 2 has tax percentages for the 5 columns
row 3 has an entry of xxx in column 3

I need to put a formula in another cell that will look up which column on row 3 has an entry, and will then return the percentage for that column from row 2.

As I said I'm sure hlookup or something will do this, I just can't seem to get the **** thing working...

Any help would be much appreciated...
 
thanks for that, unfortunately though it does not seem to work, it just displays the first value of the a1:a4 lookup headers regardless of whether there is a value in a cell or not?

i presume this was not the intended result, i think there must be an extra level of array formula required to check whether there is a value in the corresponding header array association?
 
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
scant said:
thanks for that, unfortunately though it does not seem to work, it just displays the first value of the a1:a4 lookup headers regardless of whether there is a value in a cell or not?

i presume this was not the intended result, i think there must be an extra level of array formula required to check whether there is a value in the corresponding header array association?

I used the wrong ranges in the formula...

=INDEX($A$1:$D$1,MATCH(TRUE,A2:D2<>"",0))

Still to be confirmed with control+shift+enter.
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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