+ Reply to Thread
Results 1 to 16 of 16

Conditional formatting between columns in diferent worksheets

  1. #1
    Registered User
    Join Date
    01-17-2012
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    7

    Conditional formatting between columns in diferent worksheets

    Hello!

    I've trying to apply conditional formatting to a column but not succeeded. I get the message "You cannot use references to other worksheets or workbooks for Conditional Formatting criteria."

    Conditional formatting.xlsx

    Could someone help me?

    Thanks
    Last edited by matiati; 01-17-2012 at 04:57 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,037

    Re: Conditional formatting between columns in diferent worksheets

    Please upload example workbook in the forum.

    Click Edit -> Go advanced and then click Paper clip icon and upload file.
    Never use Merged Cells in Excel

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Conditional formatting between columns in diferent worksheets

    Hi and welcome to the forum

    For use Conditional Formatting, ragarding another workbook, you must Give Names to the ranges.

    If you want, upload a sample workbook to the forum. Not a link.

    Hope to helps you.


    @Zbor.Ιt looks, to worked at the same time..
    Last edited by Fotis1991; 01-17-2012 at 10:05 AM.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Registered User
    Join Date
    01-17-2012
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Conditional formatting between columns in diferent worksheets

    Thanks for your replies and sorry for the link, I have already fixed it.

    Regards!

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Conditional formatting between columns in diferent worksheets

    ...By whitch conditions??

  6. #6
    Registered User
    Join Date
    01-17-2012
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Conditional formatting between columns in diferent worksheets

    Not equal, that's why A7 and A13 should be highlighted...

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,037

    Re: Conditional formatting between columns in diferent worksheets

    For CF on other sheet you must define names and then create rule by that name.

    or you can add extra column in Sheet1 and then make CF by that column.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-17-2012
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Conditional formatting between columns in diferent worksheets

    Thanks for your time zbor.

    I don't understand the procedure to "create rule by that name" and how "=$A1<>INDEX(Column_A,ROW($A1))" appeared

  9. #9
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Conditional formatting between columns in diferent worksheets

    Take a look to the example,

    Hope to helps you.
    Attached Files Attached Files

  10. #10
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,037

    Re: Conditional formatting between columns in diferent worksheets

    Quote Originally Posted by matiati View Post
    I don't understand the procedure to "create rule by that name" and how "=$A1<>INDEX(Column_A,ROW($A1))" appeared

    Select one cell, few cells or whole row or column.

    For example, select from A3 to A10.

    In upper left corner you will see A3

    Instead of A3 write some name like: test

    Now, your range (A3:A10) is named test and you can make for example =COUNTA(test) and get some number same as =COUNTA(A3:A10)

    That name (in my example Column_A) I gave to range A:A in Sheet2 and I create rule by that name

  11. #11
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Conditional formatting between columns in diferent worksheets

    Great work Zbor!!

  12. #12
    Registered User
    Join Date
    01-17-2012
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Conditional formatting between columns in diferent worksheets

    Quote Originally Posted by zbor View Post
    Select one cell, few cells or whole row or column.

    For example, select from A3 to A10.

    In upper left corner you will see A3

    Instead of A3 write some name like: test

    Now, your range (A3:A10) is named test and you can make for example =COUNTA(test) and get some number same as =COUNTA(A3:A10)

    That name (in my example Column_A) I gave to range A:A in Sheet2 and I create rule by that name
    zbor, that's was clear for me, what I don't get is the creating rule procedure. Let's go step by step:

    1°) In worksheet Column1 name the range A2:A13 test1
    2°) In worksheet Column2 name the range A2:A13 test2
    3°) Conditional formatting > Manage rules... > New Rule...
    4°) Select a Rule Type: Use a formula to determine which cells to format, Format values where this formula is true: "test1" <> "test2", Format: fill blue.

    That procedure doesn't work, I'm doing something wrong at step 4.

    Thanks!

  13. #13
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,037

    Re: Conditional formatting between columns in diferent worksheets

    Yes, last procedure doesn't work.

    You see, you must compare value in first sheet (A1, A2, A3...) with same value in other sheet (A1, A2, A3).

    First value is: $A1
    Second value is: INDEX(Column_A,ROW($A1)) <---- Column_A is test2 in above example

    CF criteria is: =$A1<>INDEX(Column_A,ROW($A1))

  14. #14
    Registered User
    Join Date
    01-17-2012
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Conditional formatting between columns in diferent worksheets

    zbor, following these steps:

    1°) In worksheet Column2 name the range A2:A13 test2
    2°) In worksheet Column1 select the range A2:A13
    2°) Conditional formatting > Manage rules... > New Rule...
    4°) Select a Rule Type: Use a formula to determine which cells to format, Format values where this formula is true: =$A2<>INDEX(test2,ROW($A2)) , Format: fill blue.


    It didn't work either. The field applies to contains "=$A$2:$A$13".

  15. #15
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,646

    Re: Conditional formatting between columns in diferent worksheets

    Quote Originally Posted by matiati View Post
    zbor,
    4°) Select a Rule Type: Use a formula to determine which cells to format, Format values where this formula is true: =$A2<>INDEX(test2,ROW($A2)) , Format: fill blue.
    It didn't work either. The field applies to contains "=$A$2:$A$13".
    Try to replace $A2(equals 2) with $A1(equals 1), because of test2 start from A2, so to get 1st value in test2, you must use $A1 in INDEX function.
    Quang PT

  16. #16
    Registered User
    Join Date
    01-17-2012
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Conditional formatting between columns in diferent worksheets

    Thanks bebo021999, that way it worked

    The thread can be closed, regards!

+ 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