+ Reply to Thread
Results 1 to 5 of 5

Format Cell is Sheet1.A1 = Sheet2.A1

Hybrid View

  1. #1
    Registered User
    Join Date
    06-16-2005
    Posts
    8

    Format Cell is Sheet1.A1 = Sheet2.A1

    Basically I have two sheets of data, which I have sorted to ensure that they are in the same order, but I need to highlight differences between the two.

    I have already used a 3rd sheet to do a basic '=Sheet1!A1=Sheet2!A1 to give me a list of true and false, but I then have to keep flicking between the sheets to find out which cells are different and what they say.

    What I want is a macro which I can run which compares the cells and then formats them (say colour them red) if the cells have different values. As it is a matrix from A1:BC1494 I am getting stuck trying to nest loops to make it check each cell.

    Any help appreciated!

    Thanks in advance

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Format Cell is Sheet1.A1 = Sheet2.A1

    Use your formula in Conditional Formatting applied to the cells on either sheet1 or sheet2. Use the Formula Is option for the CF.

  3. #3
    Registered User
    Join Date
    06-16-2005
    Posts
    8

    Re: Format Cell is Sheet1.A1 = Sheet2.A1

    I tried that, but it says you can't use references to other worksheets in the CF formula.

  4. #4
    Registered User
    Join Date
    06-01-2009
    Location
    India
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    66

    Cool Re: Format Cell is Sheet1.A1 = Sheet2.A1

    Yes, you are right. you cannot refer to other worksheets with conditional formatting
    Last edited by Excel Matic; 08-07-2009 at 09:50 AM. Reason: New reply
    Mohit Khurana, CFA

    Excel Matic - A blog on MS Excel

    List of Essential Excel Shortcuts

    e-Book on Excel Math Functions

    Please add to our reputation if you find our replies as helpful.

  5. #5
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Format Cell is Sheet1.A1 = Sheet2.A1

    Yes, you are right. you cannot refer to other worksheets with conditional formatting
    Well, not directly and I should have remembered.
    Create a named range for the list of cells on sheet2 then use this named range as the reference in a COUNTIF formula for the CF.

    Example:
    Sheet2 A2:Axxx = "the list" and is given the name Sht2Data

    On sheet1, using the CF Formula option

    =COUNTIF(Sht2Data,A2)>0

+ 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