+ Reply to Thread
Results 1 to 5 of 5

Count multiple formula.. but with a twist!

Hybrid View

  1. #1
    Registered User
    Join Date
    03-04-2009
    Location
    newcastle
    MS-Off Ver
    Excel 2003
    Posts
    9

    Count multiple formula.. but with a twist!

    Hi Guys,

    Im having a huge problem.. here goes;

    I have a spreadsheet which is populated by data on another spreadsheet. Therefore this entire spreadsheet contains formulae, rather than values.

    i want to do a multiple count like this;

    =SUM((f2:f2000=”PHARMACY”)*(h2:h2000=”Yes”))

    I have tried this as well as entering it as an array formula. I have also tried adding a column in with only number 1's, so if the above criteria is met, it could count the 1's in this column... but still no luck..

    I think the problem im having is that the spreadsheet is formulae, and the count functions are not picking up the values?

    Does anyone have any solutions as i am not going mental!

    Thanks

    Paul

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Count multiple formula.. but with a twist!

    You need to use SUMPRODUCT

    =SUMPRODUCT((f2:f2000=”PHARMACY”)*(h2:h2000=”Yes”))

  3. #3
    Registered User
    Join Date
    03-04-2009
    Location
    newcastle
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Count multiple formula.. but with a twist!

    Thanks Palmetto, but his formula does not work!

    Ive even tried it on a simple 3x5 table, to no avail!

  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: Count multiple formula.. but with a twist!

    what do you mean a table?
    "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
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Count multiple formula.. but with a twist!

    check for trailing spaces etc... ie does this work ?

    =SUMPRODUCT(--(TRIM(f2:f2000)=”PHARMACY”),--(TRIM(h2:h2000)=”Yes”))

    if it does either/or/and values in F & H contain leading/trailing spaces - ie PHARMACY does not exist per se, it may be "Pharmacy " or " Pharmacy" etc...

+ 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