+ Reply to Thread
Results 1 to 3 of 3

Help with finding specific number and returning the right sum

Hybrid View

  1. #1
    Registered User
    Join Date
    11-04-2010
    Location
    London, England
    MS-Off Ver
    Excel 2008
    Posts
    2

    Help with finding specific number and returning the right sum

    You'll have to excuse me, I'm not quite sure how to word this. I think the formula I'm thinking of is either HLOOKUP or VLOOKUP.

    Basically, I have multiple worksheets in one Excel document, I want a formula the searches each different worksheet, checks to see if there's an ID code (which I'll specify) in the worksheet and return the sum of products sold to the "main" worksheet.

    I hope that makes sense! I've attached the Excel document as an attachment if you need to take a look at what I mean.

    Thanks for any help in advance!
    Attached Files Attached Files
    Last edited by Hybride; 11-04-2010 at 03:15 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Help with finding specific number and returning the right sum

    Your worksheet came up with errors and produced blank sheets.. but essentially you will need to do either one of these:

    1. Use SUMIF on each sheet to sum each sheet based on condition and put the result in the same cell of each sheet.

    e.g. =SUMIF(A1:A100,"X",B1:B100) this would be applied to each sheet and says to sum all values in column B1:B100 where A1:A100 = "X" (without quotes).

    Then in your summary tab, you use formula like: =SUM('Sheet A:Sheet X'!X1) where Sheet A:Sheet X is the range of sheets and X1 is the cell in each sheet containing the individual SUMIF formulas.

    2. List the names of all the sheets in your Summary tab somewhere then apply formula like:

    =SUMPRODUCT(SUMIF(INDIRECT("'"&X1:X10&"'!A1:A100"),"X",INDIRECT("'"&X1:X10&"'!B1:B100")))

    where X1:X10 contains the names of the sheets and like before B1:B100 on each sheet would be summed based on A1:A100 on each sheet containing an "X"


    Note: Option 1 is more efficient as it doesn't use SUMPRODUCT (which is more resource intensive) and it doesn't include volatile functions like INDIRECT (which recalculate with an direct or indirect change you make in your sheet).
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    11-04-2010
    Location
    London, England
    MS-Off Ver
    Excel 2008
    Posts
    2

    Re: Help with finding specific number and returning the right sum

    I know this must have been a really easy and obvious question for you to answer but in my eyes you are a genius. Thank you so much, you've just made my life a lot easier

+ 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