+ Reply to Thread
Results 1 to 8 of 8

Using Named Formulas in Indirect

  1. #1
    Forum Contributor
    Join Date
    12-13-2007
    Location
    Central New York
    MS-Off Ver
    Home: 2007, Office: 2010
    Posts
    158

    Using Named Formulas in Indirect

    I have several Named formulas: P6Term6, P6Term5....., P5Term5, P5Term4... ...)

    And a Cell (using a validation list) with numbers 1-6 (I want this number to be used to call the right formulas (P#Term6, P#Term5, and so on), where # is the value in the cell (named "Power")

    When I call the named ranges manually in a cell (i.e. =P6Term6) it works fine.

    My trouble is trying to make it so I can use the cell to change the one number.

    I am using the following formula:
    Please Login or Register  to view this content.
    I am getting a #REF error, although when I evaluate the formula it seems good utill the end. I am just learning named ranges and INDIRECT so I do not have much expierience in this. Any help would be appreciated.

    Thanks

    Mark

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Why not just?

    =INDIRECT("P"&Power&"Term6")
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434
    The #REF suggests that the POWER named range is returning an invalid value.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Forum Contributor
    Join Date
    12-13-2007
    Location
    Central New York
    MS-Off Ver
    Home: 2007, Office: 2010
    Posts
    158
    Thank you both for rplying so quickly

    NBVC, originally, I assumed that I needed to pass it through a text, rather than a number. But, i also tried it the way you stated and it didn't work that way either.

    Andy, When I put "=Power" in a cell, it works fine and returns "6".

    I have posted the workbook, I hope you can follow it, it is still a work in progess, therefore a little messy. (I have colored the particular cells that I am working on with red)

    Thanks again,
    Mark
    Attached Files Attached Files

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434
    I assume it fails because the formula are array formula

    =INDEX(LINEST(yRng/Scale^6,(xRng/Scale)^{1,2,3,4,5,6}),1)

  6. #6
    Forum Contributor
    Join Date
    12-13-2007
    Location
    Central New York
    MS-Off Ver
    Home: 2007, Office: 2010
    Posts
    158
    I guess I don't understand why, if I can put =P6Term6 in a cell and it works, then why can't I have a formula concatenate that "P6Term6" and have transfer into a cell.

    Thank you for your help anyway, I appreciate your time and effort.

    Mark

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    I tried converting it to a non-array formula by just using ^1 in the P6Term6 named formula and it still gave REF error... I even tried using a new name that didn't reference POWER at all (i.e. I created a PTerm6) and it still failed...

    There's gotta be a quirk there...but can't figure it out yet.

  8. #8
    Forum Contributor
    Join Date
    12-13-2007
    Location
    Central New York
    MS-Off Ver
    Home: 2007, Office: 2010
    Posts
    158
    I have been racking my brain trying to get this because as I watch it in the formula evaluater, it does indeed (in the steep just before the #REF) given an output of "P6Term6" and , like I said, If I simple put "P6Term6" in the formula, it works just fine.

    I guess, Im just stuck with it. Maybe someone else will speak up with an answer.

    thanks again

+ 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