+ Reply to Thread
Results 1 to 8 of 8

SUMPRODUCT calcs....

  1. #1
    Registered User
    Join Date
    06-12-2008
    Posts
    12

    SUMPRODUCT calcs....

    To the brains out there...

    In the attached, you can see that I am wanting a formula to show accumulating profits for a certain month AND for a certain ‘type’ of trade. DT would be a ‘day-trade’, for example. This being the case…

    I need a formula for N4 that shows the total profits (referencing column H) for the month of June (referencing column I) but ONLY for trades labeled ‘DT’ (as per B column). I'm fairly certain that it's a ‘SUMPRODUCT’ formula that I’ve used before, but I can’t get the syntax. Once one of you provides it, I realize it’s a matter of copying the syntax for all other trade types and as relates to what month they’re occurring in, et al.

    Thanks very much and look forward to your solution;

    Somebodyhadto.

    Martin B.
    Attached Files Attached Files

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try

    =SUMPRODUCT((B4:B200="DT")*(MONTH(I4:I200)=6)*(H4:H200))
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    Hi,

    I have adjusted a brackted which i thought was at wrong place
    Hope its gives the correct value.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-12-2008
    Posts
    12

    Thank you so much, but Houston has a real problem now...

    For the life of me, I don't get it.

    On the sample sheet, the formula(s) worked fine. But when I attempted to use the same formula on the REAL workbook I devised, I get the #VALUE thing happening (if I try it on the first worksheet somewhere) and on the intended target worksheet, I doesn't even recognize the calcs as a formula.

    Here's what I have going into the 2nd worksheet "Monthly Trade Tracking 2008" in Cell G4

    =SUMPRODUCT(--(Trade Tracking Spreadsheet 2008!C4:C2000="DT"),--(Trade Tracking Spreadsheet 2008!L4:L2000),--(Trade Tracking Spreadsheet 2008!MONTH(M4:M2000)=6))

    We're almost there, I just know it.

    Thanks again...look forward to your solution(s).

    Take care,

    Martin B.
    Attached Files Attached Files
    Last edited by Somebodyhadto; 06-15-2008 at 05:35 PM.

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Change the formula in H4 to
    =IF(ISBLANK(G4),0,SUM(G4*D4)+D4)
    then use
    =SUMPRODUCT(--(MONTH('Trade Tracking Spreadsheet 2008'!M4:M2000)=6)*('Trade Tracking Spreadsheet 2008'!C4:C2000="DT")*('Trade Tracking Spreadsheet 2008'!H4:H2000))
    HTH

    VBA Noob

  6. #6
    Registered User
    Join Date
    06-12-2008
    Posts
    12

    Uh, I don't get that...

    Hi there VBA Noob.

    I don't see what that formula you suggested is supposed to refer to and unfortunately it doesn't calculate right. You ARE referring to my most recent workbook I hope?

    Cell G4 of the 'Monthly Trade Tracking 2008' must add up ONLY the values in column L of the 'Trade Tracking Spreadsheet 2008' as it relates to June AND as it relates to being "DT" or not.

    The total that should then appear in cell G4 of the 'Monthly Trade Tracking 2008' sheet is $674.00

    I'm very grateful for your efforts and if you get it, great! I think, now, you know where I'm heading. I wonder what's throwing things off?

    Martin
    Last edited by Somebodyhadto; 06-15-2008 at 08:05 PM.

  7. #7
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Martin

    Try
    'monthly trade tracking 2008'!G4:
    =SUMPRODUCT(--('Trade Tracking Spreadsheet 2008'!C4:C2000="DT"),('Trade Tracking Spreadsheet 2008'!L4:L2000),--(MONTH('Trade Tracking Spreadsheet 2008'!M4:M2000)=6))

    rylo

  8. #8
    Registered User
    Join Date
    06-12-2008
    Posts
    12

    Cheers Rylo - thank you

    Much appreciated - think that sussed it.

    Martin

+ 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