if(iserror(vlookup(blah blah blah),1,vlookup(blah blah blah))
basically, this changes teh result of the formula to 1 instead of #N/A. Now
you can do a conditional format on the 1.
I'd say make the 1 a text string, but vba doesn't like quotes
"Frantic Excel-er" wrote:
Hi,
I have a Vlookup function in column H of a worksheet (which is written in
code as part of a macro). I want to do conditional formatting if the vlookup
result is #N/A (which I would also like to be part of my macro). I need to
do this for all the cells in column H, not just one specific cell. In the
worksheet, I may or may not have a #N/A to highlight. Any help would be
GREATLY APPRECIATED...as I have been trying to figure this out for 3 hours
now.
Thanks,
Sara
|