+ Reply to Thread
Results 1 to 8 of 8

indirect function not giving intended results

  1. #1
    Registered User
    Join Date
    09-24-2019
    Location
    london
    MS-Off Ver
    Office 365
    Posts
    12

    indirect function not giving intended results

    Hey guys,

    I'm stuck on this formula I'm trying to do.

    I'm using something like this:

    INDIRECT("'"&A1&"'!"&B1)

    I put name of the sheet from where I want to pull information in A1 in sheet where is the formula(lets say sheet1), lets say A1=sheet2. All good so far. I want to put cell reference in B1 in the sheet1 (lets say B1=D3).

    My problem is that this formula takes value from Sheet2 and B1 in sheet2. I want this formula to take values from sheet2 ( as per value in A1) and whatever is in sheet1B1 (D3 in this case).


    So right now I end up with Sheet2B1 but i would like to end up with Sheet2D3.


    I hope this is not too confusing but I cant figure this out and I would really appreciate any help.

    Thank you in advance.

    Jakub

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,717

    Re: indirect function

    Welcome to the Forum kubo3!

    The formula you showed should do what you said you want it to do. If it is not doing that, I am guessing that what you did in your actual Excel file is not what you think you did.

    Can you attach your file here? The paper clip icon does not work for attachments. To attach a file, under the text box where you type your reply click the Go Advanced button. On the next screen scroll down and click on Manage Attachments, which will show a pop-up window to Select and Upload a file. Then close the window.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    09-24-2019
    Location
    london
    MS-Off Ver
    Office 365
    Posts
    12
    Thank you very much for quick reply. Actual file is at my work. I will double check what I did and post the file later if Im still stuck
    .

    Thanks again



    Quote Originally Posted by 6StringJazzer View Post
    Welcome to the Forum kubo3!

    The formula you showed should do what you said you want it to do. If it is not doing that, I am guessing that what you did in your actual Excel file is not what you think you did.

    Can you attach your file here? The paper clip icon does not work for attachments. To attach a file, under the text box where you type your reply click the Go Advanced button. On the next screen scroll down and click on Manage Attachments, which will show a pop-up window to Select and Upload a file. Then close the window.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,711

    Re: indirect function not giving intended results

    In cell B1 you don't need an equals sign - just type the text D3, then you should get the correct result.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    09-24-2019
    Location
    london
    MS-Off Ver
    Office 365
    Posts
    12

    Re: indirect function not giving intended results

    Thank you very much for the replies, I'm still stuck on the same, I have uploaded the file if you could have a look.

    Thanks again.
    Attached Files Attached Files

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,711

    Re: indirect function not giving intended results

    Change the formula in B1 to this:

    =INDIRECT("'"&A9&"'!"&B9)

    i.e. remove the quotes from around the B9. The way you had it, the formula was taking B9 as text, so it was that cell that it was trying to get the data from.

    Hope this helps.

    Pete

  7. #7
    Registered User
    Join Date
    09-24-2019
    Location
    london
    MS-Off Ver
    Office 365
    Posts
    12

    Re: indirect function not giving intended results

    That has fixed it, thank you very much!

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,711

    Re: indirect function not giving intended results

    Glad to hear it.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Also, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Interquartile range function giving wrong results
    By gko_87 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-04-2017, 12:21 PM
  2. LARGE function not giving desired results
    By jobdillon in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-07-2016, 12:42 PM
  3. [SOLVED] Problem with IF Function not giving right results.
    By CKANE86 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-29-2015, 04:39 PM
  4. Replies: 5
    Last Post: 01-30-2015, 06:39 PM
  5. [SOLVED] Indirect function giving #REF! error
    By mqdias in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-03-2013, 10:21 AM
  6. Indirect, if function giving #ref
    By michellecairns in forum Excel General
    Replies: 5
    Last Post: 12-23-2011, 09:09 AM
  7. OR function not giving proper results
    By charliec in forum Excel General
    Replies: 3
    Last Post: 12-05-2010, 07:03 PM

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