Paul Hyett said:
[....]
Thanks - it does what it is supposed to, though it
does produce the occasional unexpected result
(isn't that always the way).
No, it isn't. If you gave us more information, we might be able to help you
perfect the formula (or the one below).
At a minimum, copy-and-paste from the Conditional Formatting formula field
into your posting so that we see the syntax exactly as you entered it. Do
not retype the formula, since that might introduce syntax differences.
Better: upload an example Excel file to a file-sharing website, be sure to
mark the uploaded file "shared", and post the "shared" URL (link;
http://...) here. The following is a list of some free file-sharing
websites.
Box.Net:
http://www.box.net/files
Windows Live Skydrive:
http://skydrive.live.com
MediaFire:
http://www.mediafire.com
FileFactory:
http://www.filefactory.com
FileSavr:
http://www.filesavr.com
FileDropper:
http://www.filedropper.com
RapidShare:
http://www.rapidshare.com
Paul Hyett said:
However, when I tried to extend the conditional format
formula to include a 2nd cell to cross-check with, it
spat it out :
=IF((and(O3<>"",ISNUMBER(MATCH(O3,L4:L13,0),
(p3<>"",ISNUMBER(MATCH(p3,M4:M13,0))))))
First, L4:L13 and M4:M13 must be absolute references, i.e. $L$4:$L$13 and
$M$4:$M$13, in order for you to copy the conditional format into other cells
in columns O and P or in a parallel column. That might explain why the
original formula produced "occassional unexpected results" as you noted
above.
Second, the new formula can be written:
=IF(AND(O3<>"",P3<>""),
IF(ISNUMBER(MATCH(O3,$L$4:$L$13,0)),
ISNUMBER(MATCH(P3,$M$4:$M$13,0))))
Although the above is the most efficient, for edification purposes, the
following is how you might write it using AND in the manner that you tried:
=AND(O3<>"",ISNUMBER(MATCH(O3,$L$4:$L$13,0)),
P3<>"",ISNUMBER(MATCH(P3,$M$4:$M$13,0)))