+ Reply to Thread
Results 1 to 11 of 11

INDIRECT Query: How to incorporate INDIRECT to choose between two ranges?

  1. #1
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    INDIRECT Query: How to incorporate INDIRECT to choose between two ranges?

    Hi,

    I've got a SUMIF formula that looks over a range called 'Budget_Values' but i'd like to be able to switch it to a range called 'Forecast_Values' based on a drop down menu (the only two options are 'Budget' and 'Forecast') in cell A1.

    How would I incorporate the INDIRECT function to achieve this? I've tried a couple of different ways but I keep hitting Error City, Arizona

    Current formula:

    =SUMIF(Budget_Values

    Required formula:

    =SUMIF(INDIRECT(?



    Thanks,

    Snook
    Last edited by The_Snook; 10-18-2012 at 06:40 AM.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: INDIRECT Query: How to incorporate INDIRECT to choose between two ranges?

    Ηι

    See if this helps you.
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: INDIRECT Query: How to incorporate INDIRECT to choose between two ranges?

    Sorry Fotis1991, it doesn't resolve my query. I've replicated a smaller version of my problem on the attached spreadsheet.

    Regards,

    Snook
    Attached Files Attached Files

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: INDIRECT Query: How to incorporate INDIRECT to choose between two ranges?

    Hi Snook.

    Only 2 sheets and in the same columns are your data in your real workbook?

  5. #5
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: INDIRECT Query: How to incorporate INDIRECT to choose between two ranges?

    =SUMIF(INDIRECT(INDIRECT("a1")&"_Product");A12;INDIRECT(INDIRECT("a1")&"_Values"))
    Here is your formula. Paste it to the first required cell

  6. #6
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: INDIRECT Query: How to incorporate INDIRECT to choose between two ranges?

    Eisayew is in the right ball park for what i'm trying to achieve but unfortunately i'm getting an error message when I try to copy and paste it?!?!

    Any suggestions?

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

    Re: INDIRECT Query: How to incorporate INDIRECT to choose between two ranges?

    This is what you need in B12:

    =SUMIF(INDIRECT(A$1&"_Product"),A12,INDIRECT(A$1&"_Values"))

    Hope this helps.

    Pete

  8. #8
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: INDIRECT Query: How to incorporate INDIRECT to choose between two ranges?

    Quote Originally Posted by The_Snook View Post
    Eisayew is in the right ball park for what i'm trying to achieve but unfortunately i'm getting an error message when I try to copy and paste it?!?!

    Any suggestions?
    Try to replace semicolons ";" with commas

  9. #9
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: INDIRECT Query: How to incorporate INDIRECT to choose between two ranges?

    Pete me auld mucker it looks like you've nailed it brother

    Fotis1991 and eisayew thanks for trying to assist me

  10. #10
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: INDIRECT Query: How to incorporate INDIRECT to choose between two ranges?

    You are welcome Snook, but..

    Yes. I just tried to help you BUT eisayew's formula works great. So good as Pete's formula.

    And as eisayew, is a new member here, a big Congr from me!

  11. #11
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: INDIRECT Query: How to incorporate INDIRECT to choose between two ranges?

    Quote Originally Posted by Fotis1991 View Post
    You are welcome Snook, but..

    Yes. I just tried to help you BUT eisayew's formula works great. So good as Pete's formula.

    And as eisayew, is a new member here, a big Congr from me!
    Thank you very much for welcomming,
    It is really good motivation for in my first day here
    I hope I will learn much in this forum,
    Good luck to you and everyone

+ 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