+ Reply to Thread
Results 1 to 6 of 6

Indirect Formula for an analyst

  1. #1
    Forum Contributor
    Join Date
    12-12-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    448

    Indirect Formula for an analyst

    Hello,
    Day three of my quest to become excel savvy Today, I would like to focus on the Indirect formula. Could someone please let me know cool ways and examples to use this formula (sites and/or examples are welcome) Thank you!!!!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Indirect Formula for an analyst

    a few samples...

    - try using indirect() to reference a cell on different sheets (sheet2, sheet3 etc) from a list of sheet names in sheet1

    - create a few similar range names (range1, range2 etc), and use a list to refence them
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,885

    Re: Indirect Formula for an analyst

    You can for example use INDIRECT to create dynamic charts:
    http://www.excelforum.com/excel-prog...ic-charts.html
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,736

    Re: Indirect Formula for an analyst

    In simple terms INDIRECT is used to convert text to a valid cell reference, e.g. if cell G2 contains the text D3 then this formula

    =INDIRECT(G2)

    will return the contents of D3

    ....but beware! INDIRECT function is one of several Excel functions that is volatile (OFFSET is another). Volatile means that formulas containing such functions are re-calculated every time something changes in the worksheet (even if it doesn't directly affect that cell). If you use many formulas with volatile functions that may slow your workbook, see here for more.

    Having said that there are some very useful attributes of INDIRECT. You can use it to refer to a specific cell in another worksheet, where that worksheet name is contained in a cell, e.g. if A1 contains the text "Data" (without quotes) then this formula refers to cell B2 on Data worksheet

    =INDIRECT("'"&A1&"'!B2")

    Change the sheet name in A1 and the formula will now refer to a different worksheet.

    Only INDIRECT function can do that.

    I also use it to generate arrays of numbers, e.g. if you want to generate an array of all integers from 1 to 100 for use in a formula then you can use ROW, i.e.

    =ROW(1:100)

    but because that will change if you insert rows in the worksheet you can "protect" with INDIRECT, i.e.

    =ROW(INDIRECT("1:100"))

    now that doesn't change even if you insert rows or delete rows in the worksheet (because "1:100" is a text value that doesn't change like a cell reference would)

    To move on one more step.....what if I wanted to generate integers 1 to n where n is a value contained in a cell, e.g. Z2? I can use the same formula but now containing that cell reference, i.e.

    =ROW(INDIRECT("1:"&Z2))

    If Z2 contains 9 that generates this array

    {1;2;3;4;5;6;7;8;9}
    Audere est facere

  5. #5
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: Indirect Formula for an analyst

    it may also be worth noting the Syntax of INDIRECT

    =INDIRECT(ref_text,a1)

    obvioulsy the text part is simple, you can use your references in the usual way
    eg
    Please Login or Register  to view this content.
    will create a reference for J5 (J from text and 5 from ROW(A5))

    the a1 part of the Syntax part is the fun part this is set to true or false (true default) if you set this to false it alters your reference system from typical A1 style to as R1C1 style (row1 column1) = A1 (first row first column)

    so with this would could also reference J5 with this formula
    Please Login or Register  to view this content.
    but why is that useful

    well for starters functions like MATCH return the row or column number and can be used in your references without using INDEX or other functions to lookup the result which can be useful.

    to take it a step further you can use ADDRESS in the INDIRECT function and go back to not needing the RC Style reference.

    please see my attached book it shows several ways to use

    INDIRECT.xlsx
    The Importance of INDEX - A GUIDE TO INDEX'S OTHER USES
    <--- If a post helps hit the star

  6. #6
    Forum Contributor
    Join Date
    12-12-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    448

    Re: Indirect Formula for an analyst

    Thanks all. Very useful stuff

+ 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