Hi,
A B C F
1 X 2 X
2 Y 5
3 Z Z
4 T T
5 S
This isn't completely what you want because the acceptable values are on the
same rows as the source (X to X, Y to blank, Z to Z, etc.). However, the
formula is
=IF(ISNA(VLOOKUP(A2,C$2:C$6,1,FALSE)),B2,"")
The formula treats column C as the lookup range. If the value in column A
isn't in the lookup range, the lookup returns a N/A and the formula gets the
value in the same row, column B.
www.exciter.gr: Custom Excel Application said:
You could try something like this:
=IF(ISERROR(VLOOKUP(D1,A:A;1,0)),"Not found","")
Best.
http://www.exciter.gr
Custom Excel Applications and Functions!
Assuming that the G column can be used as a "helper column", try the
following:
(If G is not possible to use you can use some other free column)
- Clear cell G1
- In cell G2 put =G1+ISNA(VLOOKUP(A2;F:F;1;FALSE)
- Copy down column G as far as you need
- In cell H2 put =INDEX(B:B;MATCH(ROW().-1;G:G;0))
- Copy down column H as far as you need
The result will be the result you want "packed" in the H column from
row 2 and downwards.
Hope this helps / Lars-Åke