Hi cnickflight,
Easily done by transferring the data to a second table.
Table 1 contains the original data. I've reduced the fruit names to three letter codes to reduce typing, but this doesn't change the process.
Column A of Table 2 contains a formula that copies existing data from column A of Table 1, and inserts null strings where there is no data in Table 1.
The formula is entered in cell A2, and filled down.
Table 2::A2: =IF(ROW()−1>COUNTA(Table 1::A),"",OFFSET(Table 1::$A$1,ROW()−1,0))
Fill down to the end of column A.
Columns B and C contain a VLOOKUP formula. The formula is the same in both columns, except for the number indicating which column of the lookup table the returned value is to come from. The 'testing' version of the formula in B2 is shown. When filled down, this formula should copy the fruit names where they that are in both lists on Table 1, in the row that they appear in column A, and display an error triangle in rows where there is no matching name in column B for the one in column A (and in the rows where column A is empty). The error message for each of these should be "VLOOKUP couldn’t find the requested value."
Table 2::B2 (testing version): =VLOOKUP($A,Table 1::$B:$C,1,FALSE)
(FALSE will display in the formula editor as "exact match")
If behaviour is as described, add IFERROR before VLOOKUP, and ,"") after the closing parenthesis to match the 'final version'. (See "Why two versions? below.)
Table 2::B2 (final version): =IFERROR(VLOOKUP($A,Table 1::$B:$C,1,FALSE),"")
Table 2::C2 (final version): =IFERROR(VLOOKUP($A,Table 1::$B:$C,2,FALSE),"")
Fill both down to the end of their respective columns. Results should now be as shown above.
Note: Why two versions?
IFERROR is great for use as an error trap, but it acts on ALL errors, not just the one you are intending to trap. Best practice is to add this trap only after you are certain the formula is not generating any error messages other than the one you are expecting and using In this case we know VLOOKUP, which has been instructed to find an "exact match" will throw an error when it can't find one. IFERROR catches that error, and places a null string in the cell, making it appear empty.
Regards,
Barry