+ Reply to Thread
Results 1 to 2 of 2

Problem with SUMIF

  1. #1
    Registered User
    Join Date
    07-21-2010
    Location
    Bakersfield, CA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Problem with SUMIF

    I am using sumif to refer to another sheet.

    Here is the sumif equation I am using. It is always set on Sheet2 for the sum.
    '=SUMIF(Sheet2!$B$2:$B$12,B2,Sheet2!$A$2:$A$12)


    I would like to be able to have this equation set on a different sheet depending on the sheet name located in the cell next to it.

    '=SUMIF(C2!$B$2:$B$12,B2,C2!$A$2:$A$12) where C2 is a cell with the desired sheet name.

    This doesn't work though. Any idea how I can do this? I can't use vba on this project, otherwise this would be simple.

    I have attached an example that hopefully explains more clearly what I should do. Thanks a million!!
    Attached Files Attached Files
    Last edited by ericsastud; 02-04-2011 at 06:26 PM. Reason: Attachment

  2. #2
    Forum Moderator Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,881

    Re: Problem with SUMIF

    Hi Eric,

    You might want to try the following formula, which uses INDIRECT:

    =SUMIF(INDIRECT("'"&C2&"'!$B$2:$B$12"),Sheet1!B2,INDIRECT("'"&C2&"'!$A$2:$A$12"))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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