Assistance Needed with Comparing

  • Thread starter Thread starter alexm999
  • Start date Start date
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
 
Hi
AFAIK this is not possible with conditional formating (even with using
a defined name)
 
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
 
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)
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top