+ Reply to Thread
Results 1 to 8 of 8

Thread: Find a sheet based on cell and then sumif or sumproduct

  1. #1
    Registered User
    Join Date
    11-25-2011
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    82

    Find a sheet based on cell and then sumif or sumproduct

    I need a formula that will look at sheet1 column A and based on that cell find the coresponding sheet in the same workbook. When sheet is located I need sum if or sumproduct formula that will look at the column C and find all "sales" and then go to column E and subtotal all amounts that have " sales" in column C. This formula will be placed on sheet 1 column B

    Thank you

  2. #2
    Valued Forum Contributor Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens Greece
    MS-Off Ver
    Excel 2003
    Posts
    2,297

    Re: Find a sheet based on cell and then sumif or sumproduct

    Would you like to upload a sample workbook for this???
    Regards

    Fotis.

    I am proud that i am Greek.

    Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?

    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.

    Please,mark your thread [SOLVED] if you received your answer.


    My Avadar picture, is from Athens Acropolis.
    http://www.theacropolismuseum.gr

    http://www.visitgreece.gr/

  3. #3
    Valued Forum Contributor
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    455

    Re: Find a sheet based on cell and then sumif or sumproduct

    Hope this help:
    In B1:
    =SUMIF(INDIRECT(A1&"!C:C"),"sales",INDIRECT(A1&"!E:E"))
    Joking
    :You look like a tourist guide!
    Last edited by bebo021999; 02-09-2012 at 02:20 PM.
    Click the star icon in left-corner of my post if you find my post userful!

    Quang PT
    quangphanidico@yahoo.com
    PM me: Y!M: quangphanidico

  4. #4
    Registered User
    Join Date
    11-25-2011
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Find a sheet based on cell and then sumif or sumproduct

    Hi Bebo,
    Formula works perfect,
    What about adding additional item to be sumed for eaxmple "sales" and 2nd item "stores". Can that be added to this formula or I need to copy paste same formula and change tha name from sales to stores?

  5. #5
    Valued Forum Contributor
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    455

    Re: Find a sheet based on cell and then sumif or sumproduct

    =SUMPRODUCT(((INDIRECT(A1&"!C:C")="sales")+(INDIRECT(A1&"!C:C")="stores"))*INDIRECT(A1&"!E:E"))
    Hope this help!
    Click the star icon in left-corner of my post if you find my post userful!

    Quang PT
    quangphanidico@yahoo.com
    PM me: Y!M: quangphanidico

  6. #6
    Registered User
    Join Date
    11-25-2011
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Find a sheet based on cell and then sumif or sumproduct

    Quote Originally Posted by bebo021999 View Post
    =SUMPRODUCT(((INDIRECT(A1&"!C:C")="sales")+(INDIRECT(A1&"!C:C")="stores"))*INDIRECT(A1&"!E:E"))
    Hope this help!
    Thanks that helps a lot unfortunately I'm running into a bigger problem where my tab names are actually dates for example(10-1-10). And I'm having a hard time formating my cells to pick up tabs and sum the data.
    Any suggestions how to go around this problem??

  7. #7
    Valued Forum Contributor
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    455

    Re: Find a sheet based on cell and then sumif or sumproduct

    Try this in any cell you want:
    =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)
    to pick up your current tab name automatically.
    If it doesnt help, try to upload an example file to get it solved soonest.
    Click the star icon in left-corner of my post if you find my post userful!

    Quang PT
    quangphanidico@yahoo.com
    PM me: Y!M: quangphanidico

  8. #8
    Registered User
    Join Date
    11-25-2011
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Find a sheet based on cell and then sumif or sumproduct

    Here is attached example.
    Attached Files Attached Files

+ 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.2.0