+ Reply to Thread
Results 1 to 9 of 9

conditional formatting referencig another sheet

  1. #1
    Forum Contributor
    Join Date
    02-09-2004
    Posts
    154

    conditional formatting referencig another sheet

    I have 2 identical sheets, noe an original and one I plan to change. I know its possible to do this using named ranges I am just not sure of the exact wording to make this work

    basically i want conditional formatting on sheet 2 to say that

    if sheet2!A1 <> Sheet1!A1 then ....

    But I want this applied to all cells in an area from N5 to GT64 where the cell on sheet 2 in that range looks at the same cell on sheet 1 in that range and colours it if they are different.

    I can set sheet1!N5:GT64 as named range "myrange" but I am not sure how i set the conditional formatting to specifically look at only the corresponding cell on the other sheet rather than the entire range and apply this to all those cells.

    this is on excell 2003

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Select N5:GT64 on Sheet2 and invoke Conditional Formatting

    Select Formula is from 1st drop down and enter this formula:

    =AND(N5<>MyRange,N5<>"")

    Then click Format and choose your color.

    This will ensure that blanks are not highlighted also.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    02-09-2004
    Posts
    154
    thanks, tried that but it only checks if every cell on sheet2 is <> the first cell of Myrange rather than checking if the cell is the same as the corresponding cell within Myrange.

    i.e. it isnt doing
    if sheet2!N5 <> sheet1!N5 the colour it
    if sheet2!N6 <> sheet1!N6 the colour it
    if sheet2!N7 <> sheet1!N7 the colour it

    its doing
    if sheet2!N5 <> sheet1!N5 the colour it
    if sheet2!N6 <> sheet1!N5 the colour it
    if sheet2!N7 <> sheet1!N5 the colour it

    It also creates a delay when switching TO the sheet with the conditional formatting on, I have a lot of cells with it on but havent seen conditional formatting create any delay before, it might be because its wrongly colouring most of the cells I guess.
    Last edited by neowok; 12-04-2008 at 10:08 AM.

  4. #4
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    I'm not sure about this..
    but generally excel 2003 does not allow you to reference another sheet in conditional formula..

    You have to use named range to reference to another sheet

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by neowok View Post
    thanks, tried that but it only checks if every cell on sheet2 is <> the first cell of Myrange rather than checking if the cell is the same as the corresponding cell within Myrange.

    i.e. it isnt doing
    if sheet2!N5 <> sheet1!N5 the colour it
    if sheet2!N6 <> sheet1!N6 the colour it
    if sheet2!N7 <> sheet1!N7 the colour it

    its doing
    if sheet2!N5 <> sheet1!N5 the colour it
    if sheet2!N6 <> sheet1!N5 the colour it
    if sheet2!N7 <> sheet1!N5 the colour it

    It also creates a delay when switching TO the sheet with the conditional formatting on, I have a lot of cells with it on but havent seen conditional formatting create any delay before, it might be because its wrongly colouring most of the cells I guess.
    No it should check the corresponding cells...because I did not make N5 absolute by adding the $ signs.. check the formula in CF again and make sure there are no double quotes around it.

  6. #6
    Forum Contributor
    Join Date
    02-09-2004
    Posts
    154
    The formula in CF starting at N5 is =N5<>Myrange

    The CF formula in N6 DOES change to =N6<>Myrange that isnt the problem

    but it only seems to look at the first cell in Myrange which is N5 on the other sheet

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    try
    highlighting on sheet 2 n5:gt64
    conditional format
    formula is

    =INDEX(myrange,ROW()-4,COLUMN()-13)<>N5

  8. #8
    Forum Contributor
    Join Date
    02-09-2004
    Posts
    154
    aha yes that has worked thanks

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try reselecting the range and applying this CF formula instead

    Please Login or Register  to view this content.

+ 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