+ Reply to Thread
Results 1 to 3 of 3

Macro to find duplicate values in different workshhet and change cell colour.

  1. #1
    Registered User
    Join Date
    08-12-2013
    Location
    Cambridge, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Macro to find duplicate values in different workshhet and change cell colour.

    Hi,

    My understanding is that conditional formatting doesn't work across worksheets. Therefore what I would like to do is create a Macro to do the following:

    If a number (e.g. 12345) is typed in column A on worksheet A and it is the same as a number already in column B on worksheet B, then that cell in worksheet A turns Blue.

    Is this doable?

    Thanks for your help.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to find duplicate values in different workshhet and change cell colour.

    Hello Gaztr1x,

    Not sure where you heard that but it isn't true. Set the conditional formatting rule to: Format values where the formula is true.

    Use this formula: =MATCH(A1,"Sheet2"!B:B,0) and select the color you want the cell to be when the condition is met.

    Change A1 to match the cell the conditional formatting is applied to.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    08-12-2013
    Location
    Cambridge, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Macro to find duplicate values in different workshhet and change cell colour.

    Hi Leith,
    Thanks for that I will give it a try. I read somewhere that in 2007, CF wouldn't work across worksheets. It is good to know that this is possible.

    I found another work around where I created an extra column with a duplicate finding formula. Then applied a conditional format to it.

    Thanks again for your 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. Bar graphs that change colour based on cell values
    By anurajay in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-17-2013, 06:45 AM
  2. [SOLVED] Macro to change text colour of adjacent cell to the same text colour as target cell
    By kayoke in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-28-2012, 04:18 AM
  3. Replies: 2
    Last Post: 06-04-2012, 06:57 AM
  4. Replies: 3
    Last Post: 11-09-2011, 12:05 PM
  5. How can I find duplicate values in a column and then change the value of a cell?
    By Excelcod in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-06-2011, 02:59 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