Consulting

Results 1 to 7 of 7

Thread: SUMIFS with sum range dependent on another cell value

  1. #1
    VBAX Newbie
    Joined
    Sep 2017
    Posts
    4
    Location

    SUMIFS with sum range dependent on another cell value

    I'm interested in seeing if anyone knows of a way to change the sum_range on a SUMIFS with values from another cell. For example, let's say that the SUMIFS is using a sum_range on a different worksheet:

    =SUMIFS(Base!$AK:$AK,Base!$O:$O,$B9)

    I want to be able to change the $AK by entering another column reference in another cell (let's say D6). I've tried using INDIRECT in the sum_range function and get the "We found a problem with this formula" dialogue box.

    Help me, VBA Express. You're my only hope.

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Have you tried "Evaluate" and "[...]"?

    Maybe you should be asking, "How do I get this certain result?" Rather than asking, "How do I fix this tool I made?"
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  3. #3
    VBAX Newbie
    Joined
    Sep 2017
    Posts
    4
    Location
    I believe that's what I was doing. My intent was to get help performing the function rather than to say "This is the formula I made. Make it work and don't rewrite it."

    I would be glad to use Evaluate on the cell, if such were possible. In my experience, however, I've been unable to get Excel to accept a formula once the "We found a problem with this formula" dialogue box comes up; I have to escape out of the cell. Therefor, I can't Evaluate the cell with the new formula.

    I'm unfamiliar with the function [...]. If you could provide some background, I would be grateful. My internet search for this function was rather unsuccessful.

  4. #4
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    My intent was to get help performing the function
    I kow, but you never told us the Functionality you need in your workbook, You only mentioned the SUMIFS() Function, which is used in the Formula "tool" you made. IOW, That Formula is a tool to do the Work you need done.

    What's the Work you need to accomplish?


    Excel XP doesn't have a SUMIFS() Function,but I bet someone here can write a VBA User Defined Function that you can use exactly as you do the SUMIFS but with the added functionality you need

    =MYCUSTOMSUMIFS(A1,Base!$O:$O,$B9)





    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  5. #5
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Indirect function example
    Attached Files Attached Files
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  6. #6
    VBAX Newbie
    Joined
    Sep 2017
    Posts
    4
    Location
    Yes sir; I apologize for not doing so in the first place. It was financial data and required a few minutes of work to mask, surprisingly.
    Attached Files Attached Files

  7. #7
    VBAX Newbie
    Joined
    Sep 2017
    Posts
    4
    Location
    Quote Originally Posted by mdmackillop View Post
    Indirect function example
    Ah, thank you! The concatenate did indeed make the INDIRECT function work. I appreciate the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •