Assistance Needed with Comparing

A

alexm999

I have 2 files:
1.txt & Daily Operations_2004.xls

I'm having difficulties comparing 2 cells in both files.

File 1.txt has a cell D63 that needs to compared to cell AO9 in fil
Daily Operations_2004.xls. If the contents of the cells are the same
then nothing happens, but if the numbers in the cells dont match,
need the cell to be colored Red.

Can anyone out there help me
 
F

Frank Kabel

Hi
AFAIK this is not possible with conditional formating (even with using
a defined name)
 
A

alexm999

Even if using the following logic:

If cell D63 in File 1.txt = Cell AO9 in file 2.txt then nothing, i
doesn't equal then turn cell red
 
F

Frank Kabel

Hi
yes: not possible with conditional Format. This would require VBA. e.g.
using an event procedure in file 1 (though your extensions indicated
you have text files. For these macros aren't possible)
 
A

alexm999

Yes Yes I know its possible. My TXT file is already delimite
automatically. Here's a partial code:

Selection.FormatConditions.DELETE
Selection.FormatConditions.Add Type:=xlCellValue
Operator:=xlNotEqual, _
Formula1:="=$AP$9"
Selection.FormatConditions(1).Interior.ColorIndex = 15

It basically copies the cell from one workbook and pastes it to anothe
then runs conditional formating and then delets the pasted cell.
What I want, through programming, is a way to skip the copy and past
procedure and just compare each cell and if not equal, make that cel
color gray (i cannot use red)
 
Top