Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .