Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Vlookup a text string

I have two sets of employee data. The first is a download from our payroll
system that gives each employees department number. The second is a download
of our health insurance billing. I need to break the health insurance bill
out to the various departments. The only field that is the "same" in both
sets of data is the employee name.
Unfortunatley, the health insurnace bill has the name in one field as "last
name, firstname middle initial". The payroll data breaks last name, first
name, and middle initial into three separate fields.
I have concatenated the payroll data into one field and then copied - paste
values so it is no longer a formula. I then tried to use vlookup combined
with the trim function in case there were unwanted spaces, but no luck. All
I can get is N/A.
Naturally, to further complicate matters, is sometimes the middle initial
appears in one set of data but not another. Also, we have several employees
with the same last names so I can't just search by last name.
Any ideas on how to lookup this data so I can get the departments from the
payroll data over to my health insurance data?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Banned
 
Posts: 5
Default Vlookup a text string

What if you combined Last+First names in a new column on both sheets
and then had a VLOOKUP search using these new columns?

http://www.exciter.gr
Custom Excel Applications and Functions!



On Oct 31, 5:39 pm, Tim Nealon
wrote:
I have two sets of employee data. The first is a download from our payroll
system that gives each employees department number. The second is a download
of our health insurance billing. I need to break the health insurance bill
out to the various departments. The only field that is the "same" in both
sets of data is the employee name.
Unfortunatley, the health insurnace bill has the name in one field as "last
name, firstname middle initial". The payroll data breaks last name, first
name, and middle initial into three separate fields.
I have concatenated the payroll data into one field and then copied - paste
values so it is no longer a formula. I then tried to use vlookup combined
with the trim function in case there were unwanted spaces, but no luck. All
I can get is N/A.
Naturally, to further complicate matters, is sometimes the middle initial
appears in one set of data but not another. Also, we have several employees
with the same last names so I can't just search by last name.
Any ideas on how to lookup this data so I can get the departments from the
payroll data over to my health insurance data?

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Vlookup a text string

The problem is that last name, first name and middle initial (if present) are
all in one field on the health insurance data sheet. I am unsure of how to
break out the last name and first name into individual fields. That's why I
went the route of concatenating (is that a word?) them on the payroll data.
I like your idea. Would you have any hints on how to go about breaking the
one field into two?
Thanks,
Tim

"www.exciter.gr: Custom Excel Functions!" wrote:

What if you combined Last+First names in a new column on both sheets
and then had a VLOOKUP search using these new columns?

http://www.exciter.gr
Custom Excel Applications and Functions!



On Oct 31, 5:39 pm, Tim Nealon
wrote:
I have two sets of employee data. The first is a download from our payroll
system that gives each employees department number. The second is a download
of our health insurance billing. I need to break the health insurance bill
out to the various departments. The only field that is the "same" in both
sets of data is the employee name.
Unfortunatley, the health insurnace bill has the name in one field as "last
name, firstname middle initial". The payroll data breaks last name, first
name, and middle initial into three separate fields.
I have concatenated the payroll data into one field and then copied - paste
values so it is no longer a formula. I then tried to use vlookup combined
with the trim function in case there were unwanted spaces, but no luck. All
I can get is N/A.
Naturally, to further complicate matters, is sometimes the middle initial
appears in one set of data but not another. Also, we have several employees
with the same last names so I can't just search by last name.
Any ideas on how to lookup this data so I can get the departments from the
payroll data over to my health insurance data?

Thanks




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 91
Default Vlookup a text string

Perhaps you need to trim the names on both sources, not just the
Payroll data? Kind of hard to pinpoint the problem without actually
looking at the two sheets. Also, while troubleshooting this, I
suggest trying to get the VLookUp to work on just one pair of values
that you know should work and go from there.

Cory

On Oct 31, 10:39 am, Tim Nealon
wrote:
I have two sets of employee data. The first is a download from our payroll
system that gives each employees department number. The second is a download
of our health insurance billing. I need to break the health insurance bill
out to the various departments. The only field that is the "same" in both
sets of data is the employee name.
Unfortunatley, the health insurnace bill has the name in one field as "last
name, firstname middle initial". The payroll data breaks last name, first
name, and middle initial into three separate fields.
I have concatenated the payroll data into one field and then copied - paste
values so it is no longer a formula. I then tried to use vlookup combined
with the trim function in case there were unwanted spaces, but no luck. All
I can get is N/A.
Naturally, to further complicate matters, is sometimes the middle initial
appears in one set of data but not another. Also, we have several employees
with the same last names so I can't just search by last name.
Any ideas on how to lookup this data so I can get the departments from the
payroll data over to my health insurance data?

Thanks



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Banned
 
Posts: 5
Default Vlookup a text string

You could try with text-to-columns tool using space as the separator.
Your data may need a little correcting after this, ie in some cases
there will be 2 columns (no middle name) and in others 3 (with middle
name). It depends on how many rows you have in total.

http://www.exciter.gr
Custom Excel Applications and Functions!


On Oct 31, 8:56 pm, Tim Nealon
wrote:
The problem is that last name, first name and middle initial (if present) are
all in one field on the health insurance data sheet. I am unsure of how to
break out the last name and first name into individual fields. That's why I
went the route of concatenating (is that a word?) them on the payroll data.
I like your idea. Would you have any hints on how to go about breaking the
one field into two?
Thanks,
Tim

"www.exciter.gr:Custom Excel Functions!" wrote:



What if you combined Last+First names in a new column on both sheets
and then had a VLOOKUP search using these new columns?


http://www.exciter.gr
Custom Excel Applications and Functions!


On Oct 31, 5:39 pm, Tim Nealon
wrote:
I have two sets of employee data. The first is a download from our payroll
system that gives each employees department number. The second is a download
of our health insurance billing. I need to break the health insurance bill
out to the various departments. The only field that is the "same" in both
sets of data is the employee name.
Unfortunatley, the health insurnace bill has the name in one field as "last
name, firstname middle initial". The payroll data breaks last name, first
name, and middle initial into three separate fields.
I have concatenated the payroll data into one field and then copied - paste
values so it is no longer a formula. I then tried to use vlookup combined
with the trim function in case there were unwanted spaces, but no luck. All
I can get is N/A.
Naturally, to further complicate matters, is sometimes the middle initial
appears in one set of data but not another. Also, we have several employees
with the same last names so I can't just search by last name.
Any ideas on how to lookup this data so I can get the departments from the
payroll data over to my health insurance data?


Thanks- Hide quoted text -


- Show quoted text -





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Vlookup a text string

Try something like this.

A1 = lookup_value

A1 = Lee, Robert E

Lookup table:

...........E..........F.........G..........H
1...Smith.......Sue...................10
2...Jones.......Joe........J..........22
3...Smith.......Tom......R.........15
4...Lee.........Robert...E..........60
5...Brown....Bill.........T..........20

Array entered** : (all on one line)

=INDEX(H$1:H$5,MATCH(SUBSTITUTE(LEFT(A1,
FIND(" ",A1&" ",FIND(",",A1)+2)-1),",",""),
E$1:E$5&" "&F$1:F$5,0))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"Tim Nealon" wrote in message
...
I have two sets of employee data. The first is a download from our payroll
system that gives each employees department number. The second is a
download
of our health insurance billing. I need to break the health insurance
bill
out to the various departments. The only field that is the "same" in both
sets of data is the employee name.
Unfortunatley, the health insurnace bill has the name in one field as
"last
name, firstname middle initial". The payroll data breaks last name, first
name, and middle initial into three separate fields.
I have concatenated the payroll data into one field and then copied -
paste
values so it is no longer a formula. I then tried to use vlookup combined
with the trim function in case there were unwanted spaces, but no luck.
All
I can get is N/A.
Naturally, to further complicate matters, is sometimes the middle initial
appears in one set of data but not another. Also, we have several
employees
with the same last names so I can't just search by last name.
Any ideas on how to lookup this data so I can get the departments from the
payroll data over to my health insurance data?

Thanks



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Vlookup a text string

I should note that this is based on names where there is only one first name
like Bob. If there might be names with more than one first name like Mary
Beth, then this probably won't work unless the lookup table has each first
name in a separate cell also.

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Try something like this.

A1 = lookup_value

A1 = Lee, Robert E

Lookup table:

..........E..........F.........G..........H
1...Smith.......Sue...................10
2...Jones.......Joe........J..........22
3...Smith.......Tom......R.........15
4...Lee.........Robert...E..........60
5...Brown....Bill.........T..........20

Array entered** : (all on one line)

=INDEX(H$1:H$5,MATCH(SUBSTITUTE(LEFT(A1,
FIND(" ",A1&" ",FIND(",",A1)+2)-1),",",""),
E$1:E$5&" "&F$1:F$5,0))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"Tim Nealon" wrote in message
...
I have two sets of employee data. The first is a download from our
payroll
system that gives each employees department number. The second is a
download
of our health insurance billing. I need to break the health insurance
bill
out to the various departments. The only field that is the "same" in
both
sets of data is the employee name.
Unfortunatley, the health insurnace bill has the name in one field as
"last
name, firstname middle initial". The payroll data breaks last name,
first
name, and middle initial into three separate fields.
I have concatenated the payroll data into one field and then copied -
paste
values so it is no longer a formula. I then tried to use vlookup
combined
with the trim function in case there were unwanted spaces, but no luck.
All
I can get is N/A.
Naturally, to further complicate matters, is sometimes the middle initial
appears in one set of data but not another. Also, we have several
employees
with the same last names so I can't just search by last name.
Any ideas on how to lookup this data so I can get the departments from
the
payroll data over to my health insurance data?

Thanks





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 and finding text string that's not an exact match my Excel Discussion (Misc queries) 4 July 31st 07 05:04 PM
Sumif text is contained winthin a longer text string in a cell Johnny M[_2_] Excel Worksheet Functions 3 March 21st 07 02:50 PM
Return a text string when the result of VLOOKUP formula is #N/A jeremy nickels Excel Worksheet Functions 2 August 4th 06 05:26 PM
Splitting a text string into string and number mcambrose Excel Discussion (Misc queries) 4 February 21st 06 03:47 PM
want to remove all text characters equal to one character in length from text string [email protected] Excel Worksheet Functions 1 April 18th 05 09:56 PM


All times are GMT +1. The time now is 12:54 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"