Dear all,
There are 2 worksheets (Sheet1, Sheet2) containing similar data in my
workbook. I want to underline the text in a cell in Sheet2 if the text in
that cell is the same as the cell in the same place in Sheet1. (For example,
if Sheet1!A1 = Sheet2!A1, then Sheet2!A1 is underlined.) Can I write a
user-defined function to check whether the contents in two cells are equal?
Thanks in advance.
Best Regards,
Andy
Bernard Liengme - 01 Jan 2006 14:06 GMT
Chips has lots of stuff on duplicates, see www.cpearson.com

Signature
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email
> Dear all,
>
[quoted text clipped - 7 lines]
> Best Regards,
> Andy
Bernard Liengme - 01 Jan 2006 14:12 GMT
Oops - his name is Chip (singular)!
Goodbye Mr Chips!

Signature
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email
> Chips has lots of stuff on duplicates, see www.cpearson.com
>
[quoted text clipped - 9 lines]
>> Best Regards,
>> Andy
David McRitchie - 02 Jan 2006 17:18 GMT
Hi Andy,
Please include the complete question in the text body, one should
not be expected to look at the subject to understand the question
once the question is actually being viewed.
Conditional Formatting unfortunately cannot refer to another sheet,
but you can use a defined name for a reference and use that.
Select Cell A1 on Sheet2 then place sht2 into the name box.
as a shortcut to using Insert, Name, Define, ...
Then select the area of interest on Sheet1 with cell A1 as the active cell.
Format, Conditional Formatting,
Condition 1 Formula is: =A1=OFFSET(sht2,ROW()-1,COLUMN()-1)
You might want to use a pattern color instead of using Font, underscore
to try to underscore a empty cell.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
> Dear all,
>
[quoted text clipped - 7 lines]
> Best Regards,
> Andy