Results 1 to 24 of 24

Count distinct values that correspond to a criteria

Threaded View

  1. #20
    Registered User
    Join Date
    04-21-2013
    Location
    france
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Count distinct values that correspond to a criteria

    With UDF

    Function ItemsDifferentsCritere(champ, champcritere, critere)
      Set MonDico = CreateObject("Scripting.Dictionary")
      a = champ
      b = champcritere
      For i = 1 To champ.Count
        If b(i, 1) = critere And a(i, 1) <> "" Then
           temp = a(i, 1)
           MonDico(temp) = temp
        End If
      Next i
      ItemsDifferentsCritere = MonDico.Count
    End Function
    JB
    Attached Files Attached Files

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