PC Review


Reply
Thread Tools Rate Thread

Compare columns - weird baffling problem

 
 
ChipButtyMan
Guest
Posts: n/a
 
      18th Sep 2008
Hi,
I have tried three different codes & get the same strange problem.
I have two columns A & B.
My code/s compare the serial numbers in column A with column B and
returns;
what numbers column A has that column B hasn't to 'result column' D
what numbers column B has that column A hasn't to 'result column' E

This works fine when I type the serial numbers into A & B myself by
hand, however,
when I import the list of numbers into column A (copy & paste from
someone elses file)
it returns incorrect results ie. it returns serial numbers that exist
in both columns to both results columns!
That is strange enough in itself but it gets stranger;
I can rectify the problem simply by retyping the serial number in each
cell in column A?
For example, if after running the code B1P04599 wrongly appears in all
four columns, I simply type over B1P04599 in column A, run the code
again & B1P04599 no longer appears in columns D & E?
Anyone got any ideas what is causing this strange behaviour?

Thanks for your help.
 
Reply With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      18th Sep 2008
there are probably extra spaces or you are comparing data where the
Capitalization is different in the two columns. Click on one of the cells
you are having problems with then go to the F(x) box at top of worksheet.
Click in F(x) box. Then use the arrows (left and right) to move cursor
across box and see if there are blank characters at the beginning or end of
the string. Try for both column A and Column B data.

"ChipButtyMan" wrote:

> Hi,
> I have tried three different codes & get the same strange problem.
> I have two columns A & B.
> My code/s compare the serial numbers in column A with column B and
> returns;
> what numbers column A has that column B hasn't to 'result column' D
> what numbers column B has that column A hasn't to 'result column' E
>
> This works fine when I type the serial numbers into A & B myself by
> hand, however,
> when I import the list of numbers into column A (copy & paste from
> someone elses file)
> it returns incorrect results ie. it returns serial numbers that exist
> in both columns to both results columns!
> That is strange enough in itself but it gets stranger;
> I can rectify the problem simply by retyping the serial number in each
> cell in column A?
> For example, if after running the code B1P04599 wrongly appears in all
> four columns, I simply type over B1P04599 in column A, run the code
> again & B1P04599 no longer appears in columns D & E?
> Anyone got any ideas what is causing this strange behaviour?
>
> Thanks for your help.
>

 
Reply With Quote
 
Nigel
Guest
Posts: n/a
 
      18th Sep 2008
Without seeing the code it is difficult to predict.

But I suspect that you have some spaces or other non-visible characters in
the imported data. Try adding some trim functions to the comparison process
in your code.

Post your code if the problem persists.


--

Regards,
Nigel
(E-Mail Removed)



"ChipButtyMan" <(E-Mail Removed)> wrote in message
news:d2a8d218-f613-4fd9-b78e-(E-Mail Removed)...
> Hi,
> I have tried three different codes & get the same strange problem.
> I have two columns A & B.
> My code/s compare the serial numbers in column A with column B and
> returns;
> what numbers column A has that column B hasn't to 'result column' D
> what numbers column B has that column A hasn't to 'result column' E
>
> This works fine when I type the serial numbers into A & B myself by
> hand, however,
> when I import the list of numbers into column A (copy & paste from
> someone elses file)
> it returns incorrect results ie. it returns serial numbers that exist
> in both columns to both results columns!
> That is strange enough in itself but it gets stranger;
> I can rectify the problem simply by retyping the serial number in each
> cell in column A?
> For example, if after running the code B1P04599 wrongly appears in all
> four columns, I simply type over B1P04599 in column A, run the code
> again & B1P04599 no longer appears in columns D & E?
> Anyone got any ideas what is causing this strange behaviour?
>
> Thanks for your help.


 
Reply With Quote
 
ChipButtyMan
Guest
Posts: n/a
 
      19th Sep 2008
Thanks guys,
Trim fixed the problem, panic over,
Thanks again
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Baffling DNS Problem =?Utf-8?B?bXZwMjM=?= Windows XP Networking 7 27th Jul 2008 05:16 AM
Baffling probs with IIS, MMC in general, network connections, winamp? (Weird stuff.) Phill_W Windows XP General 2 4th Dec 2005 06:31 AM
Baffling problem Mike Chamberlain Windows XP Basics 2 17th Mar 2005 06:39 AM
Baffling Problem Chaplain Doug Microsoft Access Reports 1 5th Apr 2004 01:17 AM
Completely Baffling Problem Phil Windows XP Internet Explorer 4 21st Jan 2004 07:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:34 PM.