Count multiple numbers in the same column

  • Hi, can the below code be modified to change "UW" to count (not sum) how many times 0, 1, 2, 3 appear in the same column. I think KjBox originally gave me the code, cheers.

  • Is the intent to find out if x(i, 5) = the number of numeric in the chosen column?

    It is easy enough, but difficult from you question to ensure that is what you are after.


    if so you would do something like replace:

    Code
    Const Status As String = "UW"

    with

    Code
    dim UW as long
    UW = Application.WorksheetFunction.Count(Sheet1.Range("B1:B10"))

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!