Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Here is my original formula

=IF(ISNA(VLOOKUP($A3,INDIRECT("'"&G$2&"'!$B$3:$I$516"),6,FALSE)),"✖",
    IF(VLOOKUP($A3,INDIRECT("'"&G$2&"'!$B$3:$I$516"),6,FALSE)=$D3,
    IF(INDEX(INDIRECT("'"&G$2&"'!$A$3:$A$516"),
    MATCH($A3,INDIRECT("'"&G$2&"'!$B$3:$B$516"),0))>0,
    INDEX(INDIRECT("'"&G$2&"'!$A$3:$A$516"),
    MATCH($A3,INDIRECT("'"&G$2&"'!$B$3:$B$516"),0)),"✔"),"✓"))

Which will place an X if the value isn't found, the first type of check mark if the criteria matches and the other kind if it's found but the criteria doesn't match.

I learned today that ISERROR shortens the ISNA structure that I've built up by removing the redundant lookup. How can I use that (or something else) to shorten this formula?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

If you are using Excel 2007 or later use

=IFERROR(IF(VLOOKUP($A3,INDIRECT("'"&G$2&"'!$B$3:$I$516")
                             ,6,FALSE)=D3,"✔","✓"), "✖")

If using Excel 2003 or earlier use

=IF(ISNA(MATCH($A3,INDIRECT("'"&G$2&"'!$B$3:$b$516"),FALSE)),"✖",
  IF(VLOOKUP($A3,INDIRECT("'"&G$2&"'!$B$3:$I$516"),6,FALSE)=D3,"✔","✓"))
share|improve this answer
    
I hadn't thought of putting the IF inside the IFERROR, thanks! –  Stephen Sep 24 '11 at 2:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.