The =countif() version looks at Q22:Q40 and counts how many times A10 appears in
that range. If it finds any, then it uses the =Vlookup() function. If it
doesn't find any, then it plops in "" (so it looks empty).
The =match() version will return a number indicating what row of Q22:Q40 has the
same value as A1. If it doesn't find one, then that =match() returns #n/a.
J.E.'s formula: If it doesn't find a match (#n/a would be returned), then show
"", else show the =vlookup result.
Common problems in =vlookup()s are the data doesn't quite match--extra leading
spaces/extra trailing spaces or even extra internal spaces.
And if your data is numeric, then it has to be the same in both spots. If your
value is '123 (leading apostrophe-or cell formatted as text) and you try to
match it against 123 (really numeric), then the match won't be found.
(But I don't think that's the problem with your formula. =Countif() is more
forgiving (but =match() and =vlookup() isn't). You'd get a different error
(#n/a from =vlookup().))
And if you obtained your data from a web site, those things that look like
spaces may not be spaces. They could be char(160)'s (non-breaking spaces in
html speak.)
Try retyping the data that should match (both spots) and see if that fixes it.
If it does, you may want to use David McRitchie's TrimAll subroutine:
http://www.mvps.org/dmcritchie/excel/join.htm#trimall
(look for "Sub Trimall()")
David also has instructions on how to install a macro and run it at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm