Results 1 to 6 of 6
  1. #1
    Lounger
    Join Date
    Feb 2002
    Location
    US
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    compare two colunms and bold different cells (2000)

    I have two colunms of data. and want to compare them so that the cells in first colunm containing different number than the second colunm will be formated "bold". any idea for the codes ?
    thank you very much

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: compare two colunms and bold different cells (2000)

    Do you want to bold a cell if it is different from the corresponding cell in the second column, or do you want it bold if it is different from all of the cells in the second column? For example, in the following, which cells should be bold:

    <pre>
    A B
    1 1 2
    2 1 1
    3 2 1
    4 3 4
    5 4 5

    </pre>

    Legare Coleman

  3. #3
    Lounger
    Join Date
    Feb 2002
    Location
    US
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: compare two colunms and bold different cells (2000)

    cells in column b are all unique number.
    I want it bold if it is different from all of the cells in the second column.
    thank you
    Joe Xie

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: compare two colunms and bold different cells (2000)

    Select the column which will have bolded those values which do not appear in the second column. I'll assume this is column A and the second column being compared against is column B, and the first cell in the first column is A1. Select Format,Conditional. In the dialog box showing "Cell Value Is", click the drop down and select Formula Is, then in the formula box enter =NOT(COUNTIF(B:B,A1)), then click Format, Font tab, Bold, OK, OK.
    -John ... I float in liquid gardens
    UTC -7ąDS

  5. #5
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: compare two colunms and bold different cells (2000)

    You can use conditional formatting to do this. If the "unique number" are in column B, and the numbers you want to bold are in column A, then do the following:

    1- Select Column A.

    2- Select "Conditional Formatting..." from the Format menu.

    3- In the dialog box, select "Formula is" in the drop down list on the left.

    4- Enter the formula below into the Formula Text Box:

    <pre>=ISERROR(VLOOKUP(A1,$B:$B,1,FALSE))
    </pre>



    5- Click on the Format button.

    6- Click on Bold under Font style.

    7- Click on OK twice.
    Legare Coleman

  6. #6
    Lounger
    Join Date
    Feb 2002
    Location
    US
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: compare two colunms and bold different cells (2000)

    It works like a charm.
    thank you all for the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •