ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Compare Question (https://www.excelbanter.com/excel-discussion-misc-queries/2885-compare-question.html)

nick

Compare Question
 
I have two list. One was generated from an old DOS program using the
print to file option the other is a regular list in Excel. The problem
is the list that was generated using the print to file option
truncated the NAME field to 19 characters. The other list has full
name. The question is is it possible to compare the values of cells
using the first 10 characters or is there a way to truncate the full
name file to 19 characters then compare the two?

Any help would be appriciated.

IanRoy

Hi, Nick;
If you want to compare the first 10 characters of A2 to the first 10 of B2,
then in another cell your formula is:
=EXACT(LEFT(A2,10),LEFT(B2,10))
Returns TRUE if the first 10 characters of each match, FALSE if they don't.
Regards,
IanRoy.

"nick" wrote:

I have two list. One was generated from an old DOS program using the
print to file option the other is a regular list in Excel. The problem
is the list that was generated using the print to file option
truncated the NAME field to 19 characters. The other list has full
name. The question is is it possible to compare the values of cells
using the first 10 characters or is there a way to truncate the full
name file to 19 characters then compare the two?

Any help would be appriciated.


Dave Peterson

I'd insert a helper column and extract the first 19 (or 10 characters):

=left(a1,19)
and drag down.

Once you have the two columns you need to compare, I'd look at some of the ways
Chip Pearson suggests at:
http://www.cpearson.com/excel/duplicat.htm

nick wrote:

I have two list. One was generated from an old DOS program using the
print to file option the other is a regular list in Excel. The problem
is the list that was generated using the print to file option
truncated the NAME field to 19 characters. The other list has full
name. The question is is it possible to compare the values of cells
using the first 10 characters or is there a way to truncate the full
name file to 19 characters then compare the two?

Any help would be appriciated.


--

Dave Peterson

Hari

Hi,

Just to add to previous posts truncation may also be done by selecting the
single column range and then doing Data - text to columns - Fixed width -
click on 19 from the scale and enter.

--
Thanks a lot,
Hari
India

"nick" wrote in message
...
I have two list. One was generated from an old DOS program using the
print to file option the other is a regular list in Excel. The problem
is the list that was generated using the print to file option
truncated the NAME field to 19 characters. The other list has full
name. The question is is it possible to compare the values of cells
using the first 10 characters or is there a way to truncate the full
name file to 19 characters then compare the two?

Any help would be appriciated.





All times are GMT +1. The time now is 08:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com