Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 55
Default Approximate matches with vlookup?

I have two worksheets, and I need to vlookup the values from the cells on
one worksheet against the other. The problem is that one or both of the
source and comparison values may have trailing spaces, so I thought trim
would be appropriate- something like:

=VLOOKUP(TRIM(C7),TRIM('revised date'!trimB5:G878),6,FALSE)

but that isn't working either. I suspect that most of the time I have one or
more char(32) on the end of the comparison value array cells, so I'm open to
any suggestions on how to ensure the match. Each number may have a different
number of digits or characters, so I can't just use left(8), for example.

Thanks for any ideas,
Keith



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 73
Default Approximate matches with vlookup?

If there is a part of a field you can search for in the other sheet,
you can use the SEARCH function which lets you find a portion of a
string with in another and use wild characters...


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Approximate matches with vlookup?

The problem is that one or both of the source and comparison values may
have trailing spaces


Try this:

=VLOOKUP(TRIM(C7)&"*",'revised date'!B5:G878,6,0)

Biff

"Keith R" wrote in message
...
I have two worksheets, and I need to vlookup the values from the cells on
one worksheet against the other. The problem is that one or both of the
source and comparison values may have trailing spaces, so I thought trim
would be appropriate- something like:

=VLOOKUP(TRIM(C7),TRIM('revised date'!trimB5:G878),6,FALSE)

but that isn't working either. I suspect that most of the time I have one
or more char(32) on the end of the comparison value array cells, so I'm
open to any suggestions on how to ensure the match. Each number may have a
different number of digits or characters, so I can't just use left(8), for
example.

Thanks for any ideas,
Keith





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 approximate match question. Bill Excel Worksheet Functions 4 September 1st 06 08:44 PM
finding exact matches using vlookup Ekazakoff Excel Worksheet Functions 9 July 29th 06 02:24 PM
Vlookup 2 data matches? Nav Excel Discussion (Misc queries) 5 November 27th 05 04:18 PM
Multiple matches on VLOOKUP [email protected] Excel Worksheet Functions 2 May 9th 05 05:15 PM
how to deal with multiple matches on vlookup? Ash Excel Discussion (Misc queries) 3 March 10th 05 03:38 PM


All times are GMT +1. The time now is 01:05 PM.

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"