+ Reply to Thread
Results 1 to 7 of 7

SumProduct with using Left() Function

  1. #1
    Registered User
    Join Date
    03-19-2010
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2010, 2007,2002
    Posts
    60

    SumProduct with using Left() Function

    This formula is returning 0 and I do not know why. The colums are correct in the formula.
    What I am trying to do is write a formula that says if the first three letters column B in Portfolio Data are "TRA" and on the same row in column E there is NA Gas, then sum up all of those values that meet that criteris in column V. I am using excel 2002.

    =SUMPRODUCT(--(LEFT(PORTFOLIO_DATA!$B$2:$B$19000,3)="TRA"),--(PORTFOLIO_DATA!$E$2:$E$19000="NA Gas"),PORTFOLIO_DATA!V$2:V$19000)
    Last edited by rmb623; 01-07-2011 at 12:34 PM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: SumProduct with using Left() Function

    That formula looks OK to me, perhaps you have a problem with the data.

    One possibility is that your column to sum has text-formatted numbers, what do you get with

    =SUMPRODUCT(--(LEFT(PORTFOLIO_DATA!$B$2:$B$19000,3)="TRA"),--(PORTFOLIO_DATA!$E$2:$E$19000="NA Gas"),PORTFOLIO_DATA!V$2:V$19000+0)

    Try testing each of the other ranges with a COUNTIF, e.g.

    =COUNTIF(PORTFOLIO_DATA!$B$2:$B$19000,"TRA*")

    and

    =COUNTIF(PORTFOLIO_DATA!$E$2:$E$19000,"NA Gas")

    do you get any non-zero results?
    Audere est facere

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: SumProduct with using Left() Function

    I think if you look at DonkeyOte's post in your other thread on this question you will find his formula will solve it nicely.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Registered User
    Join Date
    03-19-2010
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2010, 2007,2002
    Posts
    60

    Re: SumProduct with using Left() Function

    Quote Originally Posted by 6StringJazzer View Post
    I think if you look at DonkeyOte's post in your other thread on this question you will find his formula will solve it nicely.
    his sumifs formula doesnt work in 2002

  5. #5
    Registered User
    Join Date
    03-19-2010
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2010, 2007,2002
    Posts
    60

    Re: SumProduct with using Left() Function

    that solved it daddylonglegs. thanks

  6. #6
    Registered User
    Join Date
    07-17-2012
    Location
    iran
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: SumProduct with using Left() Function

    Hi everybody i use below formula and it is very slow and take along time to update sheet.Please help me to speed up.
    =SUMPRODUCT(--(LEFT(All!$D:$D;4)=C$2);--(All!$A:$A=Total!$A$13);--(All!$N:$N=Total!$N3);All!$G:$G)

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: SumProduct with using Left() Function

    vahiddastitash,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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