+ Reply to Thread
Results 1 to 4 of 4

Help need in VBA code for finding repeated data count number in excel?

Hybrid View

yugeshkumar Help need in VBA code for... 06-09-2021, 09:38 AM
dangelor Re: Help need in VBA code for... 06-16-2021, 08:15 AM
yugeshkumar Re: Help need in VBA code for... 06-21-2021, 09:38 AM
dangelor Re: Help need in VBA code for... 06-21-2021, 09:40 AM
  1. #1
    Registered User
    Join Date
    06-07-2021
    Location
    india
    MS-Off Ver
    2011
    Posts
    39

    Help need in VBA code for finding repeated data count number in excel?

    Hi

    I m having address book details in Column A
    Address book contain the following details

    Name :
    Address :
    Blood group :
    Mobile : (123456789)
    etc..
    like as n number of values.

    step1-I wants to extract the all mobile number value like (123456789) to column B
    step2-using that column B value repeated numbers count number should entered in column C (ex: 1,2,3)
    step3-two times repeated mobile number copied in column D2, three times repeated mobile number copied in column E2
    step4- column D & E should have only unique values.
    Attached Files Attached Files
    Last edited by yugeshkumar; 06-09-2021 at 12:21 PM.

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    MS365 V.2406
    Posts
    2,318

    Re: Help need in VBA code for finding repeated data count number in excel?

    Not sure what you want in steps 3 & 4, but this will give you the numbers and count...
    Sub CountMobileNumbers()
        Dim d As Object, i As Long
        Dim v As Variant, k As Variant
        
        'Get mobile numbers and count them
        Set d = CreateObject("Scripting.Dictionary")
        v = Sheet1.Cells(1, 1).CurrentRegion.Value2
        For i = LBound(v) To UBound(v)
            If v(i, 1) Like "mobile*" Then
                d(v(i, 1)) = d(v(i, 1)) + 1
            End If
        Next i
        
        'Display numbers and count
        For Each k In d.keys
            Sheet1.Cells(Rows.Count, 2).End(xlUp).Offset(1) = k
            Sheet1.Cells(Rows.Count, 3).End(xlUp).Offset(1) = d(k)
        Next k
    End Sub

  3. #3
    Registered User
    Join Date
    06-07-2021
    Location
    india
    MS-Off Ver
    2011
    Posts
    39

    Re: Help need in VBA code for finding repeated data count number in excel?

    working fine thanks.

  4. #4
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    MS365 V.2406
    Posts
    2,318

    Re: Help need in VBA code for finding repeated data count number in excel?

    You're welcome. Glad I could help!

+ 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. Using macro to find email address in address book of Outlook
    By danfullwood in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-22-2014, 06:48 AM
  2. Address Book
    By Mongoose1 in forum Excel General
    Replies: 4
    Last Post: 08-23-2013, 10:32 PM
  3. Address Book Help
    By cropduster in forum Excel General
    Replies: 4
    Last Post: 01-13-2012, 02:42 PM
  4. Address book
    By zplugger in forum Excel General
    Replies: 13
    Last Post: 11-28-2011, 10:09 AM
  5. Address Book
    By zplugger in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-27-2009, 02:34 PM
  6. .xls to OE address book
    By frankg in forum Excel General
    Replies: 4
    Last Post: 07-05-2005, 04:05 PM
  7. Replies: 2
    Last Post: 02-22-2005, 08:06 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