+ Reply to Thread
Results 1 to 6 of 6

COUNTIF with several criteria

Hybrid View

perinouk COUNTIF with several criteria 06-16-2007, 09:27 AM
VBA Noob Alternative to your's ... 06-16-2007, 09:34 AM
perinouk COUNTIF with several criteria 06-16-2007, 01:34 PM
VBA Noob This assumes your Col I range... 06-16-2007, 01:38 PM
perinouk Thanks!!!!!!!!!!!! 06-16-2007, 01:47 PM
VBA Noob Glad it was helpful Thx... 06-16-2007, 01:48 PM
  1. #1
    Registered User
    Join Date
    02-23-2007
    Posts
    17

    COUNTIF with several criteria

    Hi there,

    I have a spreadsheet where I would like to add a summary pane.

    One of the summaries should count rows meeting multiple criteria being values in several separate columns. I thought I would be able to use:

    =COUNTIF($I$35:$I$1000,"G1")+ COUNTIF($I$35:$I$1000,"R")+ COUNTIF($I$35:$I$1000,"N")

    However, it doesn't work. I have searched the net and tried a load of alternative methods but I just cannot get it to work.

    Can you HELP???

    Thanks

  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
    Alternative to your's

    =SUMPRODUCT(--($I$35:$I$1000={"G1","R","N"}))

    However if it's not working can you please explain why

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    02-23-2007
    Posts
    17

    COUNTIF with several criteria

    Thanks very very much for the speedy reply!

    My mistake. The values to "R" and "N" are in column S. So how do I specify two ranges? Your suggestion returns 0.

    Thanks

  4. #4
    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
    This assumes your Col I range = "G1" and Col S range = "R" or "N"

    =SUMPRODUCT(--($I$35:$I$1000="G1")*($S$35:$S$1000={"R","N"}))

    VBA Noob

  5. #5
    Registered User
    Join Date
    02-23-2007
    Posts
    17

    Thanks!!!!!!!!!!!!

    Your ROCK! It works a treat.

    Thank you so much!

  6. #6
    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
    Glad it was helpful

    Thx for the feedback

    VBA Noob

+ 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