Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Vlookup to Find one value but exclude another | Excel Discussion (Misc queries) | |||
Vlookup to Find one value but exclude another | Excel Discussion (Misc queries) | |||
exclude blank cells in a line graph | Charts and Charting in Excel | |||
Exclude blank data from formula calculation | Excel Discussion (Misc queries) | |||
Sort Macro to Exclude Blank Rows? | Excel Worksheet Functions |