Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sumif to return a blank if sum range is blank | Excel Worksheet Functions | |||
How do I return a blank for VLOOKUP instead of #N/A? | Excel Worksheet Functions | |||
Deleting specific records | Excel Discussion (Misc queries) | |||
I need Vlookup to return a blank | Excel Discussion (Misc queries) | |||
referencing cells that return blank results | Excel Worksheet Functions |