ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Assistance Needed with Comparing (https://www.excelbanter.com/excel-programming/298869-assistance-needed-comparing.html)

alexm999[_74_]

Assistance Needed with Comparing
 
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

--
Message posted from http://www.ExcelForum.com


Frank Kabel

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

--
Regards
Frank Kabel
Frankfurt, Germany


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 file
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, i
need the cell to be colored Red.

Can anyone out there help me?


---
Message posted from http://www.ExcelForum.com/



alexm999[_75_]

Assistance Needed with Comparing
 
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

--
Message posted from http://www.ExcelForum.com


Frank Kabel

Assistance Needed with Comparing
 
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)

--
Regards
Frank Kabel
Frankfurt, Germany


Even if using the following logic:

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


---
Message posted from http://www.ExcelForum.com/



alexm999[_76_]

Assistance Needed with Comparing
 
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)

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 10:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com