Don't want to return blank records

G

Guest

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

Guest

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

Guest

Hi Dave,

I understand why I get the blanks but I only want to return records meeting
the IF's logical test. As my original question states, I was wondering
whether there was a method I could use to get around returning blanks (not
including a VBA solution).
 
G

Guest

Hi Dave,

I understand why I get the blanks but I only want to return records meeting
the IF's logical test. As my original question states, I was wondering
whether there was a method I could use to get around returning blanks (not
including a VBA solution).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top