Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have two sheets and they both have data in them. I'm trying to
compare them and if they are the same then turn the font red. I tried this but nothing happens. Dim sht1 As Worksheet, sht2 As Worksheet Set sht1 = Worksheets("Sheet1") Set sht2 = Worksheets("Ctg Sheet") If sht1.Range("f2") = sht2.Range("f22") Then sht1.Range("F2").Font.Color = 3 End |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try this
Sub test() Dim sht1 As Worksheet, sht2 As Worksheet Set sht1 = Worksheets("Sheet1") Set sht2 = Worksheets("Ctg Sheet") If sht1.Range("f2") = sht2.Range("f22") Then sht1.Range("F2").Font.ColorIndex = 3 End If End Sub -- Gary wrote in message ups.com... I have two sheets and they both have data in them. I'm trying to compare them and if they are the same then turn the font red. I tried this but nothing happens. Dim sht1 As Worksheet, sht2 As Worksheet Set sht1 = Worksheets("Sheet1") Set sht2 = Worksheets("Ctg Sheet") If sht1.Range("f2") = sht2.Range("f22") Then sht1.Range("F2").Font.Color = 3 End |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compare two sheets | Excel Discussion (Misc queries) | |||
compare two sheets | Excel Discussion (Misc queries) | |||
Compare 2 sheets | Excel Discussion (Misc queries) | |||
Compare Sheets | Excel Discussion (Misc queries) | |||
Compare Sheets | Excel Discussion (Misc queries) |