+ Reply to Thread
Results 1 to 10 of 10

Sumif with Indirect

Hybrid View

  1. #1
    Registered User
    Join Date
    06-10-2015
    Location
    Washington DC
    MS-Off Ver
    2013
    Posts
    16

    Sumif with Indirect

    Hello, I am trying to bake in some indirect references to a sumif function. Currently I have information in one tab that I would like to sum in another. In "Tab A", I am trying to sum the value of column C in "Tab B" if the value of column B is greater than cell G4 in "Tab A".

    The formula I am currently using is =SUMIF(INDIRECT($G$2&"!B:B"),">=$G$4",INDIRECT($G$2&"!C:C")). Cell G2 contains the name of "Tab B" and column G4 contains a date from "Tab B" that I would like to compare against. Column C contains dollar values. In my mind the evaluation of the formula is as follows:
    1) Range = Tab B column B
    2) Criteria = The date in column B is greater than the date in G4
    3) Sum Range = Values in column C where B meets criteria in step 2

    I know this is a long one so any help would be greatly appreciated!

    Thanks!

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Sumif with Indirect

    I think you want:

    =SUMIF(INDIRECT($G$2&"!B:B"),">="&$G$4,INDIRECT($G$2&"!C:C"))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

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

    Re: Sumif with Indirect

    When using INDIRECT with sheet references, it is always a good idea to use apostrophes around the sheet name as it is not always clear when you do and do not need them, i.e.:

    INDIRECT("'"&$G$2&"'!B:B")

    In your case you do need them as there is a space in TAB A.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    06-10-2015
    Location
    Washington DC
    MS-Off Ver
    2013
    Posts
    16

    Re: Sumif with Indirect

    Unfortunately neither of those worked. The formula is continuing to return zero.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Sumif with Indirect

    The only way to know for certain what the problem is, is to see the file (or a stripped down version of the file).

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Sumif with Indirect

    Quote Originally Posted by barrsm0 View Post
    Unfortunately neither of those worked. The formula is continuing to return zero.
    If you're getting 0, then the problem isn't with INDIRECT.
    It's the sumif itself.

    For troubleshooting sake, let's take out the INDIRECT for now.
    So that leaves you with
    =SUMIF('TabB'!B:B,">="&$G$4,'TabB'!C:C)

    So if that returns 0, Either:
    There are no values in column B that are >= G4
    Or the values in column C are not really numbers.

    What do each of these return
    =ISNUMBER(G4)
    =ISNUMBER('TabB'!B1) - And filled down to the end
    =ISNUMBER('TabB'!C1) - And filled down to the end

  7. #7
    Registered User
    Join Date
    06-10-2015
    Location
    Washington DC
    MS-Off Ver
    2013
    Posts
    16

    Re: Sumif with Indirect

    Jonmo, your solution worked. Thanks so much!

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Sumif with Indirect

    Quote Originally Posted by barrsm0 View Post
    Jonmo, your solution worked. Thanks
    I didn't offer a solution. I only suggested troubleshooting steps.

    I assume those steps led you to a solution though, so You're welcome.

    Care to share what the actual problem/solution was?

  9. #9
    Registered User
    Join Date
    06-10-2015
    Location
    Washington DC
    MS-Off Ver
    2013
    Posts
    16

    Re: Sumif with Indirect

    Sorry, let me clarify. The "criteria" was not formatted properly - it should have been ">="&$G$4. The formula was not evaluating the date in that cell properly.

  10. #10
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Sumif with Indirect

    Quote Originally Posted by barrsm0 View Post
    The "criteria" was not formatted properly - it should have been ">="&$G$4.
    That solution was posted by Tony Valko in Post #2

+ 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] INDIRECT Function with multiple sheets - SUMIF, INDIRECT & MATCH
    By DJDRU in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-07-2014, 08:42 AM
  2. How to use Indirect with SumIF
    By aj34321 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-15-2013, 07:27 AM
  3. SUMIF & INDIRECT Help
    By chelseagardens in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-19-2013, 04:47 PM
  4. Replies: 0
    Last Post: 08-17-2012, 02:02 PM
  5. SUMIF with INDIRECT
    By Big_Tater in forum Excel General
    Replies: 5
    Last Post: 03-30-2010, 11:32 AM
  6. SUMIF() with INDIRECT()
    By lakeshore427 in forum Excel General
    Replies: 1
    Last Post: 10-28-2009, 10:56 AM
  7. [SOLVED] SUMIF INDIRECT
    By Alectrical in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-28-2005, 10:10 AM

Tags for this Thread

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