![]() |
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. |
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. |
Compare columns - weird baffling problem
Thanks guys,
Trim fixed the problem, panic over, Thanks again |
All times are GMT +1. The time now is 03:03 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com