+ Reply to Thread
Results 1 to 3 of 3

Sum Product Shows Zero

  1. #1
    Registered User
    Join Date
    02-28-2006
    Posts
    29

    Sum Product Shows Zero

    Hi All,

    I am trying to use sumproduct instead of countif and despite searching the past entries, i'll still a bit clueless.

    I want to count the number of instances where the cell in column A is a "12" and the value in column B is a "F".

    However, when I enter the formula below, it produces a zero. When i use it on purely text (e.g. if A = Fred and B= Mary) it works, but when i mix a number with a text value, i don't get the result i hoped for (i.e. 2, using the data below).

    =SUMPRODUCT((F8:F16="12")*(G8:G16="m"))


    Can anyone see what i'm doing wrong and how it can count combinations of different cell formats (text, numbers, dates etc).

    12 M
    13 F
    12 M
    14 M
    01 F

    Cheers,

    John Mc

  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
    Hi remove the " " from around the 12

    E.g
    =SUMPRODUCT((F8:F16=12)*(G8:G16="m"))

    VBA Noob

  3. #3
    Registered User
    Join Date
    02-28-2006
    Posts
    29

    Sum Product Now Shows 2!

    Hi VBA Noob,

    why is it always just something small like that? Just enough to make you think Doh, why didn't i think of that?

    I wouldn't have spotted it though, so thanks very much for helping me out.

    Cheers,

    John Mc

+ 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