+ Reply to Thread
Results 1 to 11 of 11

Sumproduct Syntax issue

  1. #1
    Registered User
    Join Date
    07-07-2011
    Location
    Ft. Worth Texas
    MS-Off Ver
    Excel 2010
    Posts
    7

    Cool Sumproduct Syntax issue

    Hello All.

    I have a Syntax issue. Or Should I say that I hope that a Syntax issue is all that it is. I am working in Excel 2010 on Windows 7.
    Here is my formula

    =SUMPRODUCT(('PROJECT NAME Tickets'!U:U=3)*('PROJECT NAME Tickets'!S:S="DAL")*('PROJECT NAME Tickets'!K:K="Stage"),--('PROJECT NAME Tickets'!H:H<="*"&locks for Data sync&"*"))

    My issue is with the very last section of it.
    ('PROJECT NAME Tickets'!H:H<="*"&locks for Data sync&"*"))

    What I am attempting to do is to look into all cells in the H column of the 'PROJECT NAME Tickets' worksheet within the same work book. I am trying to only count the cells that have the phrase "locks for Data sync" within the text that is in the cells in the H column.

    I have tried all of the following -
    ('PROJECT NAME Tickets'!H:H<="*"&locks for Data sync&"*")) Kicks back error = #NAME?
    ('PROJECT NAME Tickets'!H:H>="*"&locks for Data sync&"*")) Kicks back error = #NAME?
    ('PROJECT NAME Tickets'!H:H="*"&locks for Data sync&"*")) Kicks back error = #NAME?
    ('PROJECT NAME Tickets'!H:H="*""&locks for Data sync&""*")) Kicks back a False "0" ( the correct count is 14)
    ('PROJECT NAME Tickets'!H:H="*"locks for Data sync"*")) Kicks back a False "0" ( the correct count is 14)

    ('PROJECT NAME Tickets'!H:H="*""&locks for Data sync""*")) Kicks back a False "0" ( the correct count is 14)

    Thank you for your Time
    Tim

  2. #2
    Registered User
    Join Date
    07-07-2011
    Location
    Ft. Worth Texas
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Sumproduct Syntax issue

    I have also changed the connectors from )*( to ),--( without any change to the results.

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

    Re: Sumproduct Syntax issue

    Why not use COUNTIFS...

    =COUNTIFS('PROJECT NAME Tickets'!U:U,3,'PROJECT NAME Tickets'!S:S,"DAL",'PROJECT NAME Tickets'!K:K,"Stage",'PROJECT NAME Tickets'!H:H,"*locks for Data sync*")
    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.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Sumproduct Syntax issue

    to fix the sumproduct use
    --(ISNUMBER(SEARCH("locks for data sync",H1:H100)))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    07-07-2011
    Location
    Ft. Worth Texas
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Sumproduct Syntax issue

    Thank you both for your quick responce...

    With the =COUNTIFS('PROJECT NAME Tickets'!U:U,3,'PROJECT NAME Tickets'!S:S,"DAL",'PROJECT NAME Tickets'!K:K,"Stage",'PROJECT NAME Tickets'!H:H,"*locks for Data sync*")

    I am getting "You've entered too few arguments for this funtion"

    I am trying Martin's now and will post the results.

  6. #6
    Registered User
    Join Date
    07-07-2011
    Location
    Ft. Worth Texas
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Sumproduct Syntax issue

    Martin, I am getting the #NAME? error on yours. I am going over my text carefully to verify it is not an error on my part.

  7. #7
    Registered User
    Join Date
    07-07-2011
    Location
    Ft. Worth Texas
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Sumproduct Syntax issue

    Martin, I'm sorry... I am getting the #VALUE? error on yours. Not the #NAME?.

  8. #8
    Registered User
    Join Date
    07-07-2011
    Location
    Ft. Worth Texas
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Sumproduct Syntax issue

    If I change Martins formula to show H:H I then get the False "0" reading...

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

    Re: Sumproduct Syntax issue

    Quote Originally Posted by TimHayes View Post
    Thank you both for your quick responce...

    With the =COUNTIFS('PROJECT NAME Tickets'!U:U,3,'PROJECT NAME Tickets'!S:S,"DAL",'PROJECT NAME Tickets'!K:K,"Stage",'PROJECT NAME Tickets'!H:H,"*locks for Data sync*")

    I am getting "You've entered too few arguments for this funtion"

    I am trying Martin's now and will post the results.
    Are you using XL2010 as your profile indicates?

    If you are using XL2003 or less, then SUMPRODUCT does not allow full column references:

    e.g.

    =SUMPRODUCT(('PROJECT NAME Tickets'!U1:U100=3)*('PROJECT NAME Tickets'!S1:S100="DAL")*('PROJECT NAME Tickets'!K1:K100="Stage"),--(ISNUMBER(SEARCH("locks for Data sync",'PROJECT NAME Tickets'!H1:H100))))

    ajust ranges

  10. #10
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,677

    Re: Sumproduct Syntax issue

    COUNTIFS is probably preferable to SUMPRODUCT as it will be significantly quicker over large ranges, so unless you need backward compatability I suggest you use NBVC's suggestion - it worked OK for me when I tested it.......
    Audere est facere

  11. #11
    Registered User
    Join Date
    07-07-2011
    Location
    Ft. Worth Texas
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Sumproduct Syntax issue

    The closest that I could come with the =COUNTIFS:

    is =COUNTIFS('Project Tickets'!U:U,3)*('ProjectTickets'!S:S="DAL")*('ProjectTickets'!K:K="Stage")*('ProjectTickets'!H:H="*locks for Data sync*") and this is after Excel "Fixed" the formula for me.

    If I ran it the way it was given it will return a ........ WAIT!!!!

    IT WORKED!!!!! I re ran it with a small change. the last ) was green and I deleted it and re placed it and it worked!!!!

    Thank you both so much for your time!!

+ 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