Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 151
Default Vlookup - exclude a blank cell

Hi,

I am trying to use a VLOOKUP on a list of locations. In one list I have the
name, in the other it is the name with a space at the end. For example:

List one: SOUTHAMPTON
List two: SOUTHAMPTON_

List two is from a system so I cannot stop it putting a space at the end,
and it is this list that I need to VLOOKUP from.

How do I get the VLOOKUP to ignore the space on the end? (The locations are
various lengths and may have two words with a genuine space in the middle).

Hope this makes sense.

Thanks

Amanda
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 523
Default Vlookup - exclude a blank cell

rather than

=VLOOKUP(A1,B1:C10,2,FALSE)

use

=VLOOKUP(TRIM(A1),B1:C10,2,FALSE)

etc

"amanda" wrote:

Hi,

I am trying to use a VLOOKUP on a list of locations. In one list I have the
name, in the other it is the name with a space at the end. For example:

List one: SOUTHAMPTON
List two: SOUTHAMPTON_

List two is from a system so I cannot stop it putting a space at the end,
and it is this list that I need to VLOOKUP from.

How do I get the VLOOKUP to ignore the space on the end? (The locations are
various lengths and may have two words with a genuine space in the middle).

Hope this makes sense.

Thanks

Amanda

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
wcp wcp is offline
external usenet poster
 
Posts: 5
Default Vlookup - exclude a blank cell

=VLOOKUP(TRIM(A1),B1:C10,2,FALSE) / means to ignore all blank from cell
lookup_value.
But , I think Amanda need to ignore blank in B1:C10 (table array). So can
she use trim at the table array and use to vlookup? :
List one: SOUTHAMPTON
List two: SOUTHAMPTON___
-- list three : trim(b1) -- result = SOUTHAMPTON (no blank already)
now she can use the list three to lookup.


"Sam Wilson" เขียน:

rather than

=VLOOKUP(A1,B1:C10,2,FALSE)

use

=VLOOKUP(TRIM(A1),B1:C10,2,FALSE)

etc

"amanda" wrote:

Hi,

I am trying to use a VLOOKUP on a list of locations. In one list I have the
name, in the other it is the name with a space at the end. For example:

List one: SOUTHAMPTON
List two: SOUTHAMPTON_

List two is from a system so I cannot stop it putting a space at the end,
and it is this list that I need to VLOOKUP from.

How do I get the VLOOKUP to ignore the space on the end? (The locations are
various lengths and may have two words with a genuine space in the middle).

Hope this makes sense.

Thanks

Amanda

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 523
Default Vlookup - exclude a blank cell

There's no need for an extra list if she does,

=VLOOKUP(A1,TRIM(B1:C10),2,FALSE) eneterd with Ctrl+Shift+Enter to make it
an array formula would work.


"wcp" wrote:

=VLOOKUP(TRIM(A1),B1:C10,2,FALSE) / means to ignore all blank from cell
lookup_value.
But , I think Amanda need to ignore blank in B1:C10 (table array). So can
she use trim at the table array and use to vlookup? :
List one: SOUTHAMPTON
List two: SOUTHAMPTON___
-- list three : trim(b1) -- result = SOUTHAMPTON (no blank already)
now she can use the list three to lookup.


"Sam Wilson" เขียน:

rather than

=VLOOKUP(A1,B1:C10,2,FALSE)

use

=VLOOKUP(TRIM(A1),B1:C10,2,FALSE)

etc

"amanda" wrote:

Hi,

I am trying to use a VLOOKUP on a list of locations. In one list I have the
name, in the other it is the name with a space at the end. For example:

List one: SOUTHAMPTON
List two: SOUTHAMPTON_

List two is from a system so I cannot stop it putting a space at the end,
and it is this list that I need to VLOOKUP from.

How do I get the VLOOKUP to ignore the space on the end? (The locations are
various lengths and may have two words with a genuine space in the middle).

Hope this makes sense.

Thanks

Amanda

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Vlookup - exclude a blank cell

could you just append a space character in the value to match:

=vlookup(a1&" ",sheet2!a,b,2,false)

Personally, I'd take the time to clean up that system file. If I couldn't
change the original file, I'd change the copy that I opened (and not save when I
closed it!).

amanda wrote:

Hi,

I am trying to use a VLOOKUP on a list of locations. In one list I have the
name, in the other it is the name with a space at the end. For example:

List one: SOUTHAMPTON
List two: SOUTHAMPTON_

List two is from a system so I cannot stop it putting a space at the end,
and it is this list that I need to VLOOKUP from.

How do I get the VLOOKUP to ignore the space on the end? (The locations are
various lengths and may have two words with a genuine space in the middle).

Hope this makes sense.

Thanks

Amanda


--

Dave Peterson
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
Vlookup to Find one value but exclude another JLatham Excel Discussion (Misc queries) 0 September 9th 09 01:19 PM
Vlookup to Find one value but exclude another MS-Exl-Learner Excel Discussion (Misc queries) 0 September 9th 09 10:56 AM
exclude blank cells in a line graph Whitehorn Charts and Charting in Excel 2 February 25th 09 08:53 PM
Exclude blank data from formula calculation Donna Excel Discussion (Misc queries) 3 April 15th 08 12:36 PM
Sort Macro to Exclude Blank Rows? ScottPcola Excel Worksheet Functions 1 January 5th 06 07:10 PM


All times are GMT +1. The time now is 12:04 PM.

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

About Us

"It's about Microsoft Excel"