Lookup/match question (this one is a bit involved)

mikebroder

New Member
Joined
Aug 28, 2014
Messages
2
ok so lets say i have a sheet that has data on it like this...

name new add up acc
bob 1 1 1 4
joe 2 1 1 3
ed 3 3 2 3


I want to be able to locate a header like name or new or add and then have it list me the items underneath it

the thing is, the original sheet gets columns added to it in various places, but the headers always stay the same...so while "new" might be in column 2 today, it may be in column 3 tomorrow

this one has been killing me...i tried a variation of index/match, but nothing is really working unless i'm missing something...and to top it off this sheet goes from A to BH as of right now and I need to find various columns throughout...

anyone up for a challenge?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
You can use the INDEX function to do this:

=INDEX($A1:$Z1000, , MATCH("new", $A$1:$Z$1, 0))

By leaving the row parameter blank, you're returning the entire column. If you want to see this in a worksheet, use Ctrl+Shift+Enter because it is treated as an array formula. In this example, you will get the entire column of values that matches "new" in the first row.

Hope this helps.
 
Upvote 0
One more monkey wrench in the works....

so when i'm referencing "new" on another sheet, i made it a shortcut so that "new" is written in cell b3....so can i simply just reference that cell or do i have to use "new" in my formula?

Also i'm referencing data from another sheet...
 
Last edited:
Upvote 0
One more monkey wrench in the works....

so when i'm referencing "new" on another sheet, i made it a shortcut so that "new" is written in cell b3....so can i simply just reference that cell or do i have to use "new" in my formula?
You can reference anything that evaluates to "new". So yes, you can just reference your cell.

Also i'm referencing data from another sheet...
This shouldn't be a problem, but post back with the specifics if it isn't working.
 
Upvote 0
Mike, welcome to the MrExcel board!

One thing to watch out for is INDEX returning zero values when the target cell is in fact blank. My guess is that something like this might be what you need.

Here's the sheet with the main data.

Excel Workbook
ABCDEF
1namenewaddupacc
2bob1114
3joe2113*
4ed3323
5
Data Table




And here's the sheet where we are extracting the column. Formula in B4 is copied down as far as you might ever need.

Excel Workbook
B
3add
41
51
63
7
8
Extract Column
 
Upvote 0

Forum statistics

Threads
1,226,237
Messages
6,189,790
Members
453,568
Latest member
LaTwiglet85

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