+ Reply to Thread
Results 1 to 5 of 5

Is it possible to further customize the status bar to display a unique value count

Hybrid View

  1. #1
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Is it possible to further customize the status bar to display a unique value count

    As the title says, is there a way to display something like "Unique values: 3" on the Status Bar if I select 6 cells with values 1, 1, 2, 2, 3, 3?
    多么想要告诉你 我好喜欢你

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Is it possible to further customize the status bar to display a unique value count

    http://dailydoseofexcel.com/archives...lection-stats/
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Is it possible to further customize the status bar to display a unique value count

    yes it is.

    You shall prepare a code for Selectionchange event for given worksheet

    For instance it shall work:
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Dim x&, rng As Range, NoDupes As New Collection
    
    For Each rng In Target
      If Len(rng.Text) > 0 Then
        On Error Resume Next
        NoDupes.Add 1, rng.Text
        If Err.Number = 0 Then
           x = x + 1
        Else
           Err.Clear
        End If
      End If
    Next rng
    Application.StatusBar = IIf(x = 0, "", "unique values: " & x)
    End Sub
    Attached Files Attached Files

  4. #4
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Is it possible to further customize the status bar to display a unique value count

    Thanks Andy, never did anything to do with class modules before. Will look into that.

    Thanks Kaper, I was looking for something application-wide. Your input may still benefit someone else though.

  5. #5
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Is it possible to further customize the status bar to display a unique value count

    With application-wide you indeed shall probably base on Andy's link and possibly use some of my code.
    For those who look for "somewher in the middle" solution (Workbook-wide ;-) ) let me mention, that there is an option to use the same as above procedure, but in ThisWorkbook code (not particular Sheet) and then it shall be
    Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Find unique names and count their status
    By webstmonkey in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-14-2013, 01:17 AM
  2. Replies: 4
    Last Post: 04-08-2012, 09:43 PM
  3. How to count unique status on daily basis for each HR expert
    By vibhor_sharma100 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 05-17-2011, 04:57 PM
  4. Count unique values of Test ID's based on Status
    By mehulpatel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2010, 03:04 AM
  5. Status Bar : Display both Sum and Count
    By Keerthy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-11-2005, 05:05 AM

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