+ Reply to Thread
Results 1 to 11 of 11

Highlight numbers with 3 matching digits

  1. #1
    Forum Contributor Jerry HKA's Avatar
    Join Date
    09-25-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    126

    Question Highlight numbers with 3 matching digits

    Hey there,

    Can someone help me to create a macro that helps me highlight all numbers in a certain range which has 3 matching digits based on a certain number? Okay, I think this sounds a little confusing. Attached is a Excel File which explains how I need this macro to work. Please do refer to it for better explanation. If you are still confused on how I'd like this to work, please don't hesitate to ask me. Thanks.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    01-05-2014
    Location
    Portland, Maine
    MS-Off Ver
    Office 2007, 2010, 2013
    Posts
    10

    Re: Highlight numbers with 3 matching digits

    Look at conditional formatting with a formula using search and find.
    Last edited by FDibbins; 12-30-2014 at 02:04 PM.
    Daniel Davis

  3. #3
    Forum Contributor Jerry HKA's Avatar
    Join Date
    09-25-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    126

    Re: Highlight numbers with 3 matching digits

    May I ask how?

  4. #4
    Registered User
    Join Date
    01-05-2014
    Location
    Portland, Maine
    MS-Off Ver
    Office 2007, 2010, 2013
    Posts
    10

    Re: Highlight numbers with 3 matching digits

    On home tab, go to conditional formatting, then select new rule. Select format only cells that contain. Change cell value to specified text and containing. If your 3 digits never change. Just type the digits. If it is based on a cell. Type = and the cell's address. Click format and setup accordingly. Click ok and change the applies to column to the range you want to format. No macro required
    Last edited by FDibbins; 12-30-2014 at 02:04 PM.

  5. #5
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Highlight numbers with 3 matching digits

    Try

    Please Login or Register  to view this content.
    - Battle without fear gives no glory - Just try

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Highlight numbers with 3 matching digits

    FWIW:

    Please Login or Register  to view this content.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Highlight numbers with 3 matching digits

    Try
    Please Login or Register  to view this content.
    Last edited by jindon; 12-30-2014 at 03:59 PM. Reason: Missed a comma

  8. #8
    Forum Contributor Jerry HKA's Avatar
    Join Date
    09-25-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    126

    Re: Highlight numbers with 3 matching digits

    Thank you very much, PCI and JOHN H. DAVIS! Your codes are working perfectly. Thanks. As for Jindon's code, well, it doesn't allow me the liberty to choose the range and the 4 digit number I am using to search the spreadsheet, but I guess I can just try to change that myself and learn a little bit on how excel codes work. Thanks, guys, for helping me. If I have any more questions, I'll just ask away in this thread.

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Highlight numbers with 3 matching digits

    Ahh, you want to choose the number(s)
    Then
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor Jerry HKA's Avatar
    Join Date
    09-25-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    126

    Re: Highlight numbers with 3 matching digits

    Ooh. Thanks Jindon, for helping me alter the code a little.

  11. #11
    Forum Contributor Jerry HKA's Avatar
    Join Date
    09-25-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    126

    Re: Highlight numbers with 3 matching digits

    Hey there, after using the code for some time, I found out if I inserted a number that has a 0 as the first digit or numbers with double digits or more, the code will not work properly. Can anyone please alter the code for me to fix this?

+ 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] Combine digits in double digits in 4 numbers without repeating each other
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-14-2014, 08:18 AM
  2. vlookup only the right most 4 digits of the 6 digits sequential numbers
    By tabcm66 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 05-02-2014, 07:33 AM
  3. Replies: 0
    Last Post: 12-13-2012, 08:15 AM
  4. Replies: 2
    Last Post: 10-14-2010, 11:49 PM
  5. matching numbers with different digits orders
    By foxxkat in forum Excel General
    Replies: 15
    Last Post: 05-12-2005, 11:52 PM

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