Don't want to return blank records
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 |
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 |
Don't want to return blank records
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). -- Thanks anyway, MarkN "Dave F" wrote: 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 |
All times are GMT +1. The time now is 08:53 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com