+ Reply to Thread
Results 1 to 2 of 2

Insert variable in to formula (cell lookup)

  1. #1
    Registered User
    Join Date
    07-23-2010
    Location
    Brighton, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Insert variable in to formula (cell lookup)

    what i'd like to do is have a formula that can look at a value and insert it into a formula

    eg.
    ='4 - Modelling Raw Data'!AE$1
    ='4 - Modelling Raw Data'!AN$1
    ='4 - Modelling Raw Data'!AW$1
    ='4 - Modelling Raw Data'!BF$1

    for the next worksheet / tab i have the same formulas but this time they need to look at the next row down

    ='4 - Modelling Raw Data'!AE$2
    ='4 - Modelling Raw Data'!AN$2
    ....

    is there an easy way to edit the formula so that i could define a value once which would get encorporated into the formula

    so ='4 - Modelling Raw Data'!AE$####

    where ### is 1 on sheet 1, 2 on sheet 2...

    i have 50 tabs with about 100 formulas on each page its going to take me ages if i have to do this manually.

    EDIT: A find a replace $1 with $2 seems to work would still need to be careful not to accidently ruin any other formulas by mistake. would still be useful if someone has any ideas on the above
    Last edited by jamie.finney; 07-23-2010 at 07:02 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Insert variable in to formula (cell lookup)

    If as implied the pattern to your results is 9 columns per row then if we assume you store the row of interest in say A1 with first formula in A2 (to be copied down):

    A2:
    =INDEX('4 - Modelling Raw Data'!$AE:$XFD,$A$1,1+9*(ROWS(A$2:A2)-1))
    copied down as far as required

    copied to other sheets - modifying A1 as appropriate.

    The pattern allows you to use a single formula for all.

+ 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