+ Reply to Thread
Results 1 to 5 of 5

sumproduct query

  1. #1
    Registered User
    Join Date
    01-15-2009
    Location
    england
    MS-Off Ver
    Excel 2010
    Posts
    37

    sumproduct query

    Hi All,

    I have a formula which I have copied from one of your good selves and tried to adapt it. The formula is below. I a am getting #NA as my answer.

    =SUMPRODUCT(ISNUMBER(FIND({"h","H"},B11:G11))*{0.5,1})

    I have a person name in Colomn A and then 1 week B-G on a row and want to count number of days holiday.

    Thanks

    Mark
    Last edited by luffield; 06-29-2009 at 08:23 AM.

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

    Re: sumproduct query

    What exactly are you trying to do?

    Is there only an "h" or "H" in B11:G11 or is that letter amongst others?
    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
    Forum Contributor
    Join Date
    04-16-2009
    Location
    Stellenbosch, South Africa
    MS-Off Ver
    Excel 2003; Excel 2007; Excel 2010; Excel 2013
    Posts
    136

    Re: sumproduct query

    Hi Mark

    Do you have any #N/A errors in B11:B11? If so you need to handle them there.

    BTW, your formula could also be:

    =SUMPRODUCT(ISNUMBER(SEARCH("h",B11:G11))*{0.5,1})

    SEARCH is not case sensitive...
    Regards

    Jon (Excel 2003, 2007, 2010, 2013)

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

    Re: sumproduct query

    The formula works for a column of data like A1:A10, for a row like B11:G11 you need to change the commas to semi-colons, i.e.

    =SUMPRODUCT(ISNUMBER(FIND({"h";"H"},B11:G11))*{0.5;1})

    edit: perhaps this formula would be better

    =SUMPRODUCT(EXACT(B11:G11,{"h";"H"})*{0.5;1})

    assumes that cells contain only the single letters
    Last edited by daddylonglegs; 06-29-2009 at 08:21 AM.

  5. #5
    Registered User
    Join Date
    01-15-2009
    Location
    england
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: sumproduct query

    Thanks Daddylonglegs that is just what I was after.

    Mark

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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