Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Compare columns - weird baffling problem

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Compare columns - weird baffling problem

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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Compare columns - weird baffling problem

Thanks guys,
Trim fixed the problem, panic over,
Thanks again
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
weird problem WarrenK Setting up and Configuration of Excel 0 June 5th 09 05:46 PM
Creating Names Baffling Problem Timmy Mac1 Excel Discussion (Misc queries) 4 August 22nd 06 09:00 AM
Weird problem Sue Excel Worksheet Functions 2 November 29th 05 12:10 PM
Baffling formula problem Ken Schmidt Excel Discussion (Misc queries) 2 December 21st 04 07:52 AM
Baffling problem with links Stephen POWELL Excel Worksheet Functions 13 December 8th 04 08:28 PM


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