View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default Can a formula contain an action?

"Peggy" wrote:
... a formula to match two numbers from two colums
.. I want to strikethrough both numbers if there is a match.
If there is not a match then there would be no strikethrough.


Assuming the numbers are in cols A and B,
here's a way to conditionally format it ..

A sample construct is available at:
http://www.savefile.com/files/1645577
Cond Format Matching Nos in 2 Cols_Peggy_misc.xls

Select col A
Click Format Cond Formatting
Under Condition1, make the settings as:
Formula is: =AND(ISNUMBER(MATCH(A1,B:B,0)),A1<"")
Click Format button Font tab Strikethrough OK
Click OK at the main dialog

Now do the converse for col B

Select col B
Click Format Cond Formatting
Under Condition1, make the settings as:
Formula is: =AND(ISNUMBER(MATCH(B1,A:A,0)),B1<"")
Click Format button Font tab Strikethrough OK
Click OK at the main dialog

Note that it could be difficult to distinguish visually
the strikethrough for certain numbers, eg: the numbers: 4, 44, ...
so you might want to set it to conditionally format
the cell fill to trigger as well (Patterns tab)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---