+ Reply to Thread
Results 1 to 6 of 6

Nested COUNTIF

  1. #1
    Registered User
    Join Date
    11-19-2007
    Posts
    3

    Nested COUNTIF

    I am trying to use a countif with other qualifying variables frm other columns in the same row.

    I want to get a count of non numberical data in 2 colums if both conditions are met.

    I would like to make this happen:
    Please Login or Register  to view this content.
    Do not count if the data in A is not an X. X is the actual data, not a placeholder.

    I tried SumProduct and SumIf, and Count(If...) but I am missing something someplace.

    Anyhelp is appreciated.
    Last edited by Leith Ross; 11-19-2007 at 02:22 AM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello overmyhead,

    Welcome to the Forum! This group has features to make your code easier to read, and understand. The one feature we require all members to use when posting is placing the code inside a code window. I'll do this for you since you just joined. All other posts will be your responsibility.

    How to wrap your Code
    On the Message window Toolbar you will see the # icon. This will automatically wrap the text you selected with the proper HTML tags to create a Code Window in your post. You can do this manually by placing the tag [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] at the end of the last line. If you fail to do this next time, your post will be locked until you contact me by private message.

    Please read the Forum rules by clicking on the link below...
    Forum Rules

    Sincerely,
    Leith Ross

  3. #3
    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
    Maybe

    =SUMPRODUCT(--(A1:A100="X")*(C1:C100="Yes"))
    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 !!!

  4. #4
    Registered User
    Join Date
    11-19-2007
    Posts
    3
    Thansk Noob-

    That workedperfectly. Does it work with variable text to. If I had a string of data in the second column, and I calculat bsaed on a specific term or symbol?

    Please Login or Register  to view this content.
    Where the & symbol is what is being searched for?

    Thanks again-

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699
    No, you can't use wildcards like that, try

    =SUMPRODUCT((A1:A100="X")*ISNUMBER(SEARCH("&", C1:C100)))

  6. #6
    Registered User
    Join Date
    11-19-2007
    Posts
    3

    Smile

    Perfect.

    Thanks so much. I still don't understand how sumproduct works, but it did the trick.

    Thank you again.


+ 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