Consulting

Results 1 to 4 of 4

Thread: How can I do this?

  1. #1

    How can I do this?

    I want to count all of the occurrences of the word "yes" and "no" in a column, each cell should either have yes, no or nothing.
    Is ther a formula way to do this or vba ? the range is N2:N650

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    =COUNTIF(N2:N650,"yes")

    =COUNTIF(N2:N650,"no")

  3. #3
    thats what i needed thanks

  4. #4
    VBAX Master
    Joined
    Jul 2006
    Location
    Belgium
    Posts
    1,286
    Location
    [VBA]Sub counts()
    Dim yes As Long
    Dim no As Long
    yes = Application.WorksheetFunction.CountIf(Range("N2:N650"), "yes")
    no = Application.WorksheetFunction.CountIf(Range("N2:N650"), "no")
    MsgBox ("Occurances of yes : " & yes & vbCrLf & _
    "Occurances of no : " & no)
    End Sub[/VBA]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •