Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
Default String equivalence

Dear experts,
I have a very frustrating problem

I download student numbers and associated data from two separate web-based
databases. One is a a student database(SourceA) and the other is
Blackboard(SourceB), more for student/staff communication.

The same student number from these two separate sources are not seen by
excel as being equivalent. Now I have searched on the web and have been down
the route of identifying, substituting char160 for char32 and removing the
first 0.

i.e.

SourceA: "0616025915 "
SourceB: "616025915"

=TRIM(SUBSTITUTE(H10,CHAR(160),CHAR(32)))
=MID(I10,2,LEN(I10))

Char160 sits on the end of the number from SourceA.
If I apply the first formula to SourceA and then manually delete the zero,
it works, I can then use VLOOKUPS successfully.
If I apply the first and the second formula to SourceA then VLOOKUPS do not
work.

My aim is not to do anything entry by entry but come up with a formula which
renders one format equivalent to the other so the two sets of data can be
merged.

Could anyone help one exasperated little black duck!!!
Martina
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,365
Default String equivalence

Source B has the student IDs as numbers, Source A is numbers as text. Your
second formula, MID(I10,2,LEN(I10)) is retaining the text property of it even
though you stripped off the leading zero.
Try changing that formula to
=VALUE(MID(I10,2,LEN(I10)))
you may need to change the format of that column back to General. But with
those two changes, I believe you'll get the match needed.


"Martina" wrote:

Dear experts,
I have a very frustrating problem

I download student numbers and associated data from two separate web-based
databases. One is a a student database(SourceA) and the other is
Blackboard(SourceB), more for student/staff communication.

The same student number from these two separate sources are not seen by
excel as being equivalent. Now I have searched on the web and have been down
the route of identifying, substituting char160 for char32 and removing the
first 0.

i.e.

SourceA: "0616025915 "
SourceB: "616025915"

=TRIM(SUBSTITUTE(H10,CHAR(160),CHAR(32)))
=MID(I10,2,LEN(I10))

Char160 sits on the end of the number from SourceA.
If I apply the first formula to SourceA and then manually delete the zero,
it works, I can then use VLOOKUPS successfully.
If I apply the first and the second formula to SourceA then VLOOKUPS do not
work.

My aim is not to do anything entry by entry but come up with a formula which
renders one format equivalent to the other so the two sets of data can be
merged.

Could anyone help one exasperated little black duck!!!
Martina

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default String equivalence

Give this a shot for SourceA:

=MID(H10,2,LEN(H10)-2)

This should remove the leading 0 and the trailing Char(160) character.

Hope this helps.

"Martina" wrote:

Dear experts,
I have a very frustrating problem

I download student numbers and associated data from two separate web-based
databases. One is a a student database(SourceA) and the other is
Blackboard(SourceB), more for student/staff communication.

The same student number from these two separate sources are not seen by
excel as being equivalent. Now I have searched on the web and have been down
the route of identifying, substituting char160 for char32 and removing the
first 0.

i.e.

SourceA: "0616025915 "
SourceB: "616025915"

=TRIM(SUBSTITUTE(H10,CHAR(160),CHAR(32)))
=MID(I10,2,LEN(I10))

Char160 sits on the end of the number from SourceA.
If I apply the first formula to SourceA and then manually delete the zero,
it works, I can then use VLOOKUPS successfully.
If I apply the first and the second formula to SourceA then VLOOKUPS do not
work.

My aim is not to do anything entry by entry but come up with a formula which
renders one format equivalent to the other so the two sets of data can be
merged.

Could anyone help one exasperated little black duck!!!
Martina

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
Default String equivalence

Oh my Gosh, I have been working on this for days! and going around in
circles. Thank you to both of you. JLatham, the combination of the two
formulae with the change you suggested did the trick. I would like to use
one formula and initially Steve yours did not work until I double clicked in
the result cell and then clicked in another cell. How bizarre!! Is there a
perfectly rational reason for this? Thanks again People Who Know How to Use
Excel:)
Martina


"Steve Telford" wrote:

Give this a shot for SourceA:

=MID(H10,2,LEN(H10)-2)

This should remove the leading 0 and the trailing Char(160) character.

Hope this helps.

"Martina" wrote:

Dear experts,
I have a very frustrating problem

I download student numbers and associated data from two separate web-based
databases. One is a a student database(SourceA) and the other is
Blackboard(SourceB), more for student/staff communication.

The same student number from these two separate sources are not seen by
excel as being equivalent. Now I have searched on the web and have been down
the route of identifying, substituting char160 for char32 and removing the
first 0.

i.e.

SourceA: "0616025915 "
SourceB: "616025915"

=TRIM(SUBSTITUTE(H10,CHAR(160),CHAR(32)))
=MID(I10,2,LEN(I10))

Char160 sits on the end of the number from SourceA.
If I apply the first formula to SourceA and then manually delete the zero,
it works, I can then use VLOOKUPS successfully.
If I apply the first and the second formula to SourceA then VLOOKUPS do not
work.

My aim is not to do anything entry by entry but come up with a formula which
renders one format equivalent to the other so the two sets of data can be
merged.

Could anyone help one exasperated little black duck!!!
Martina

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
Default String equivalence

If I only use the first formula and double click in the resulting cell and
then click anywhere else ... It works. What is happening?

"JLatham" wrote:

Source B has the student IDs as numbers, Source A is numbers as text. Your
second formula, MID(I10,2,LEN(I10)) is retaining the text property of it even
though you stripped off the leading zero.
Try changing that formula to
=VALUE(MID(I10,2,LEN(I10)))
you may need to change the format of that column back to General. But with
those two changes, I believe you'll get the match needed.


"Martina" wrote:

Dear experts,
I have a very frustrating problem

I download student numbers and associated data from two separate web-based
databases. One is a a student database(SourceA) and the other is
Blackboard(SourceB), more for student/staff communication.

The same student number from these two separate sources are not seen by
excel as being equivalent. Now I have searched on the web and have been down
the route of identifying, substituting char160 for char32 and removing the
first 0.

i.e.

SourceA: "0616025915 "
SourceB: "616025915"

=TRIM(SUBSTITUTE(H10,CHAR(160),CHAR(32)))
=MID(I10,2,LEN(I10))

Char160 sits on the end of the number from SourceA.
If I apply the first formula to SourceA and then manually delete the zero,
it works, I can then use VLOOKUPS successfully.
If I apply the first and the second formula to SourceA then VLOOKUPS do not
work.

My aim is not to do anything entry by entry but come up with a formula which
renders one format equivalent to the other so the two sets of data can be
merged.

Could anyone help one exasperated little black duck!!!
Martina



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
Default String equivalence

I see now that it is a number/text designation which is the final discrepancy
after I remove the char 160.

I can use my first formula:
=TRIM(SUBSTITUTE(H10,CHAR(160),CHAR(32)))

and then highlight them all and take advantage of the function under the
white error tag and convert them all to numbers (also achieved by double
clicking each cell?). I am then back in action.

Thanks so much.

Martina

"Martina" wrote:

Oh my Gosh, I have been working on this for days! and going around in
circles. Thank you to both of you. JLatham, the combination of the two
formulae with the change you suggested did the trick. I would like to use
one formula and initially Steve yours did not work until I double clicked in
the result cell and then clicked in another cell. How bizarre!! Is there a
perfectly rational reason for this? Thanks again People Who Know How to Use
Excel:)
Martina


"Steve Telford" wrote:

Give this a shot for SourceA:

=MID(H10,2,LEN(H10)-2)

This should remove the leading 0 and the trailing Char(160) character.

Hope this helps.

"Martina" wrote:

Dear experts,
I have a very frustrating problem

I download student numbers and associated data from two separate web-based
databases. One is a a student database(SourceA) and the other is
Blackboard(SourceB), more for student/staff communication.

The same student number from these two separate sources are not seen by
excel as being equivalent. Now I have searched on the web and have been down
the route of identifying, substituting char160 for char32 and removing the
first 0.

i.e.

SourceA: "0616025915 "
SourceB: "616025915"

=TRIM(SUBSTITUTE(H10,CHAR(160),CHAR(32)))
=MID(I10,2,LEN(I10))

Char160 sits on the end of the number from SourceA.
If I apply the first formula to SourceA and then manually delete the zero,
it works, I can then use VLOOKUPS successfully.
If I apply the first and the second formula to SourceA then VLOOKUPS do not
work.

My aim is not to do anything entry by entry but come up with a formula which
renders one format equivalent to the other so the two sets of data can be
merged.

Could anyone help one exasperated little black duck!!!
Martina

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
Page Setup Margin Value Equivalence in cm AJ Excel Discussion (Misc queries) 1 May 14th 07 05:33 PM
VBA equivalence tp to DOS "echo off" brian Excel Discussion (Misc queries) 3 September 15th 06 02:29 AM
Equivalence of two sets of data vsoler Excel Discussion (Misc queries) 4 April 18th 06 06:08 PM
Splitting a text string into string and number mcambrose Excel Discussion (Misc queries) 4 February 21st 06 03:47 PM
to search for a string and affect data if it finds the string? Shwaman Excel Worksheet Functions 1 January 11th 06 12:56 AM


All times are GMT +1. The time now is 12:23 AM.

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"