+ Reply to Thread
Results 1 to 6 of 6

Colour paired numbers and highlight unmatched numbers

Hybrid View

  1. #1
    Valued Forum Contributor tek9step's Avatar
    Join Date
    05-27-2009
    Location
    London, England
    MS-Off Ver
    MS 365
    Posts
    395

    Colour paired numbers and highlight unmatched numbers

    Hello

    I am looking for a vba help where by it could highlight Green if one number found more than once in Column A and highlight Red those which are not paired on the Data sheet. I have highlighted in my example sheet the result expected.

    Thank you

    regards
    Attached Files Attached Files
    Last edited by tek9step; 03-18-2010 at 06:16 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Colour paird numbers and highlight unmatched numbers

    Use conditional formatting.

    1) Highlight the data and color it green, that will be the default color
    2) Apply a conditional formatting formula of:
    Condition1: Formula Is: =COUNTIF(A:A, A2)=1
    Format... Patterns > Red
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Valued Forum Contributor tek9step's Avatar
    Join Date
    05-27-2009
    Location
    London, England
    MS-Off Ver
    MS 365
    Posts
    395

    Re: Colour paird numbers and highlight unmatched numbers

    Hi JB " Always a life saver "

    I tried this but some how not sure why the result is not coming with a extrapolated example. It seems to be picking one figure above the non paired number.. ?? I have uploaded the example.

    regards
    Attached Files Attached Files
    Last edited by tek9step; 03-17-2010 at 09:57 AM.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Colour paird numbers and highlight unmatched numbers

    Hehe...your sample data started at row2, so that was the row the base formula was for. You should change A2 to A1 if you're going to apply it from row 1.

    Also, applying CF to an entire column can really come back to bite you later. Files with formatting applied wholescale like that often start to mysteriously bloat into MBs and MBs of size with no data at all in them.

    I'd apply the CF to the range you need and perhaps a "little" more.

  5. #5
    Valued Forum Contributor tek9step's Avatar
    Join Date
    05-27-2009
    Location
    London, England
    MS-Off Ver
    MS 365
    Posts
    395

    Talking Re: Colour paired numbers and highlight unmatched numbers

    Silly me !!!! Thanks JB no wonder i keep havin to delete stuff of my memory stick... JB change your office to 2007 it seems to compress files compared to 2003 wen savin hehe,,..

    regards
    Last edited by tek9step; 03-18-2010 at 06:18 AM.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Colour paired numbers and highlight unmatched numbers

    Quote Originally Posted by tek9step View Post
    ...JB change your office to 2007 ...
    Oh...shudder the thought.

+ Reply to Thread

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