+ Reply to Thread
Results 1 to 2 of 2

Formula to refer to changing Column

  1. #1
    Kenny Markhardt
    Guest

    Formula to refer to changing Column

    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



  2. #2
    Max
    Guest

    Re: Formula to refer to changing Column

    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)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Kenny Markhardt" <[email protected]> wrote in message
    news:#[email protected]...
    > 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
    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1