Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 104
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 104
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sumif to return a blank if sum range is blank [email protected] Excel Worksheet Functions 3 May 25th 06 10:25 AM
How do I return a blank for VLOOKUP instead of #N/A? ExcelBee Excel Worksheet Functions 15 September 3rd 05 07:04 AM
Deleting specific records [email protected] Excel Discussion (Misc queries) 6 June 22nd 05 11:35 PM
I need Vlookup to return a blank Eaglered Excel Discussion (Misc queries) 4 May 20th 05 02:04 AM
referencing cells that return blank results Suz Excel Worksheet Functions 4 February 21st 05 10:59 PM


All times are GMT +1. The time now is 10:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"