Can a formula contain an action?

P

Peggy

Ok, I have a formula to match two numbers from two colums and then to give me
a reference line for the second number (MATCH(A2,C:C,0))

Now I want to strikethrough both numbers if there is a match. If there is
not a match then there would be no strikethrough. I am not sure if this is
an action, or if it would be a format command. Or if it can even be done.

Any help would be greatly appreciated,

Thanks for any response!
 
B

Bob Phillips

You could use conditional formatting, which supports strikethrough.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
P

Peggy

Ok, would that be an if, then statement?

Bob Phillips said:
You could use conditional formatting, which supports strikethrough.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
P

Peggy

Right, I can't get it to strikethrough the two numbers. Only the number
(that tells me the line that the number in A matches a number in C) in the
cell that the forumula is in. There must be a way I just can't figure it out.

Thanks for all your help,

Peggy
 
M

Max

Peggy said:
... 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)
 
Top