+ Reply to Thread
Results 1 to 7 of 7

Repeated Number in string

  1. #1
    Registered User
    Join Date
    03-18-2023
    Location
    Amsterdam
    MS-Off Ver
    Office 365
    Posts
    3

    Repeated Number in string

    Dear,

    I need help creating a formula which can detect repeated numbers in a string.
    The rule is: If a number appears more than 3 times, mark as "INCORRECT ACCOUNT NUMBER"
    Example:


    NL15ABNA0123456789
    NL15ABNA0123451234
    NL15ABNA0123456789
    NL15ABNA0424456784 INVALID ACCOUNT NUMBER (Number "4" appears more than 3 times)

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Repeated Number in string

    with Power Query

    is that what you want?

    Index AccNum Note
    0
    NL15ABNA0123456789
    1
    NL15ABNA0123451234
    2
    NL15ABNA0123456789
    3
    NL15ABNA0424456784 INVALID ACCOUNT NUMBER
    4
    NL15ABNA0123252782 INVALID ACCOUNT NUMBER
    5
    NL15ABNA0123252787
    6
    NL15ABNA0333253332 INVALID ACCOUNT NUMBER
    Last edited by sandy666; 03-18-2023 at 02:40 PM.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Repeated Number in string

    Formula alternative:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Registered User
    Join Date
    03-18-2023
    Location
    Amsterdam
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Repeated Number in string

    Hi Sandy, yes that is correct.

  5. #5
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Repeated Number in string

    as I said this is a Power Query - no formula, no vba
    if you add more Account Numbers just right click on the green table and select Refresh
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-18-2023
    Location
    Amsterdam
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Repeated Number in string

    Glenn I am amazed! I cannot thank you enough. That formaula is just amazing!

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Repeated Number in string

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please click on "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

+ 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] How to detect a string that has repeated words?
    By TiberSeptim in forum Excel General
    Replies: 1
    Last Post: 05-19-2020, 09:36 PM
  2. [SOLVED] Repeated words: remove duplicates, display word along with the number of times repeated
    By number9 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-24-2019, 03:32 PM
  3. Finding the position of a repeated characters in a string
    By salasmau in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 05-13-2015, 05:30 PM
  4. [SOLVED] Find non repeated characters in a string
    By salasmau in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-08-2015, 10:03 AM
  5. [SOLVED] Need to identify repeated text in a string
    By bwiddoes in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-23-2014, 01:10 PM
  6. Replies: 2
    Last Post: 07-15-2011, 04:11 PM
  7. Extract repeated words from Text string
    By Calman in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-14-2007, 10:22 PM

Tags for this Thread

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