View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave F Dave F is offline
external usenet poster
 
Posts: 2,574
Default Don't want to return blank records

You're getting blanks because the logic of your function reads "IF F1 equals
G1, THEN do a VLOOKUP, ELSE return blank."

Can you just have the VLOOKUP, without the IF-THEN-ELSE construction?
--
Brevity is the soul of wit.


"MarkN" wrote:

I have two lists. List1 contains all companies (some of the companies occur
hundreds of times). List2 contains a unique listing for each company along
with two numbers. If the two numbers next two List2 are the same, I want to
return all company details from List1. I am currently using something like
=IF(F1=G1,VLOOKUP(E1,$A$2:$C$23,1,FALSE),"") and this works fine but I get a
lot of blank rows where F1 does not equal G1. I can just filter the blanks
and carry on okay but I was wondering if there is a way to return just those
rows where the numbers match and not leave the blank rows.
--
Thanks,
MarkN