Dynamic formula to check column and apply

harinsh

Active Member
Joined
Feb 7, 2012
Messages
273
Hi Team,

I have data and everytime when I extract columns re-arranged automatically however, header names never change, hence, whenever I update formula the reference of column will change everytime.

Is there any way to check column header if that's true then execute the rest of formula?? So, that it will pick the right data as input.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
You can likely use Index and Match for that.
But we can't really offer specifics without seeing your actual formula.
 
Upvote 0
Ok, here is the sample data and formula using...assume data start from A1 cell to C14 cell


Serial NumberNameAge
2948A40
3685B41
1020C43
3737D40
1724E39
4850F35
2805G46
1950H46
1108I36
1928J33
1597K44
3166L34
1052M42

<tbody>
</tbody>

Serial NumberFormula
3737D =VLOOKUP(E3,$A$1:$C$14,2,0)
1724E

<tbody>
</tbody>

If tomorrow column A re-align to column b...formula should work
 
Last edited:
Upvote 0
Which version of Excel are you using?

If XL2007+, convert that range to a Table by highlighting the range, On the Insert Tab, click Table.
Make sure to check "My Table has headers"

Then you can use
=INDEX(Table1[Name],MATCH(E3,Table1[Serial Number],0))
 
Last edited:
Upvote 0
Thanks for your quick response, May I know what is exactly "Serial Number" here ...is this second table where I'm taking data from column number ?
 
Upvote 0
Hi Jonmo1,

I still see formula only look at column based on column...if column changes formula still referring the old column only. Any work around for this.
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,269
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