Formula to refer to changing Column

K

Kenny Markhardt

Column D
1 FieldName
2 =MATCH(D$1,INDIRECT($B$1&"!$A$2:$AZ$2"),0)
3 =MATCH($A$2,INDIRECT($B$1&"!$P:$P"),0)


Cell D2 finds the column with the correct data to use - In this case it's 16
or P - Could be anything from 1 to 50
Cell D3 then should find the starting row for the Column found in D2. -
Could be anything from 1 to 30,000
Need the formula in D3 to change depending on what D2 finds. i.e. hardcoded
$P:$P should change to $Q:$Q if D2 is 17
 
M

Max

Perhaps try in D3 either:
=MATCH($A$2,OFFSET(A:A,,D2-1),0)

or

=MATCH($A$2,OFFSET(A:A,,
MATCH(D$1,INDIRECT($B$1&"!$A$2:$AZ$2"),0)-1),0)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top