View Poll Results: Was this Query useful?

Voters
1. You may not vote on this poll
  • Very Useful

    1 100.00%
  • Common

    0 0%
Multiple Choice Poll.
+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23

Thread: How to get the Sum in a Single SUMPRODUCT maintaining the Different Criterions?

  1. #16
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    1,697

    Re: How to get the Sum in a Single SUMPRODUCT maintaining the Different Criterions?

    I think I got it and thanks to you NBVC I just kept on trying..just added a few more conditions..


    Intentionally for readablity purposes put the formula in Quotes


    SUMPRODUCT((SubSrNoRng=$B2)*(PymtForRng="Regular Payments")*((SUBSTITUTE(CashToCrdt,"Amount","")=ModesRng)+(ModesRng="Cheque")*(ChqStatusRng="Cleared")),AmtRng)

    Warm Regards
    e4excel
    Last edited by e4excel; 01-16-2012 at 05:39 PM.

  2. #17
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    1,697

    Re: How to get the Sum in a Single SUMPRODUCT maintaining the Different Criterions?

    It worked well but I hve to share that there was an anomaly which I have not actually understood clearly but have still managed to luckily curb and still get the expected answers..


    
    =SUMPRODUCT((SubSrNoRng=$B2)*(PymtForRng="Regular Payments")*((SUBSTITUTE(CashToCrdt," Amount","")=ModesRng)+(ModesRng="Cheque")*(ChqStatusRng="Cleared"))*(AmtRng>2),AmtRng))

    First I had tried adding Blanks after each Mode but then I removed it and just added an extra Blank in between "Cheque Amount"..

    Now can someone please explain me as to whats the big deal about this ,please find all the "Cheque Columns
    Cheque Bank
    Cheque Branch
    Cheque No
    Cheque Amount
    Cheque Date
    Cheque Deposit Date
    Cheque Clearing Status


    Please can someone track the anomaly..

    Warm Regards
    e4excel
    Last edited by e4excel; 01-17-2012 at 04:50 AM.

  3. #18
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,637

    Re: How to get the Sum in a Single SUMPRODUCT maintaining the Different Criterions?

    Probably all the items in CashToCrdt have an extra space?

    If there is a drop down list, check that the list doesn't have extra spaces....

    I know your original "Fruit" sample had trailing spaces everywhere.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  4. #19
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    1,697

    Re: How to get the Sum in a Single SUMPRODUCT maintaining the Different Criterions?

    Actually, there's no big problem as its working but I am not understanding why thats happening?

    These are the different columns with the Following Headings
    ---Col I to ---Col O

    Cheque Bank ---Col I
    Cheque Branch
    Cheque No
    Cheque Amount ---- Added Extra Space to make this work...between Cheque and Amount..
    Cheque Date
    Cheque Deposit Date
    Cheque Clearing Status------Col O --- This is a Data Vaildation and gets activated only when there is cCheque mentioned in the Mode Column F..

    So--- Col O is Data Validation
    ..=IF($F2="Cheque",Cheque_Status,"")
    and the Cheque_Status is a Defined Name which has all the elements like
    Cheque_Status
    Cleared
    Bounced
    Hold
    Post Dated Chq


    Warm Regards
    e4excel

  5. #20
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,637

    Re: How to get the Sum in a Single SUMPRODUCT maintaining the Different Criterions?

    So are there 2 spaces between Cheque and Amount? If so, then check this range: ModesRng for trailing spaces.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  6. #21
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    1,697

    Re: How to get the Sum in a Single SUMPRODUCT maintaining the Different Criterions?

    No NBVC there are NOne ..and thats the reason its strange to understand

  7. #22
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,637

    Re: How to get the Sum in a Single SUMPRODUCT maintaining the Different Criterions?

    Well, again without seeing the actual spreadsheet, I can't keep guessing...

    Also: I just noticed you added a poll to the thread... please don't do that unless you are asking for actual polls (I.e. doing a survey)
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  8. #23
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    1,697

    Re: How to get the Sum in a Single SUMPRODUCT maintaining the Different Criterions?

    OK I am not really aware of the use of a Poll but I just tried it for the first time..
    If you want you can remove it..

+ 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