PC Review


Reply
Thread Tools Rate Thread

Delete duplicate data in a single cell

 
 
kacey28
Guest
Posts: n/a
 
      23rd Jun 2008
I have a spreadsheet provided by an outsourced company that has duplicate
data within a single cell. For example, a cell with Name values will have
"Jerry White Jerry White" (twice), rather than once "Jerry White".

When duplicate values appear in the same cell, how do you manage to clean
these up without manually deleting data in each individual cell? (Note - I
have several columns that contain various duplicated data.)

Thanks in advance for any help!
 
Reply With Quote
 
 
 
 
ryguy7272
Guest
Posts: n/a
 
      23rd Jun 2008
I think this will work for you:
=LEFT(A1,FIND(" ",A1,1)-1)&RIGHT(A1,FIND(" ",A1,1)+2)


Regards,
Ryan---

--
RyGuy


"kacey28" wrote:

> I have a spreadsheet provided by an outsourced company that has duplicate
> data within a single cell. For example, a cell with Name values will have
> "Jerry White Jerry White" (twice), rather than once "Jerry White".
>
> When duplicate values appear in the same cell, how do you manage to clean
> these up without manually deleting data in each individual cell? (Note - I
> have several columns that contain various duplicated data.)
>
> Thanks in advance for any help!

 
Reply With Quote
 
Dave
Guest
Posts: n/a
 
      23rd Jun 2008
Hi,
This is a bit long-winded, but it's all I could think of.
With the data to be examined in A2:

=IF(MOD(LEN(A2),2)=1,IF(LEFT(A2,(LEN(A2)-1)/2)=RIGHT(A2,(LEN(A2)-1)/2),LEFT(A2,(LEN(A2)-1)/2),A2),A2)

Copy down as required.
Regards - Dave.
 
Reply With Quote
 
kacey28
Guest
Posts: n/a
 
      23rd Jun 2008
Thank you, ryguy7272.

I tried the formula supplied and here's the result:

Field A1 data: CRYSTAL BERNIER CRYSTAL BERNIER

Field A1 data (after formula): CRYSTALAL BERNIER

As you can see, the formula sucessfully removed the duplicate first/last
name, however, it added additional letters to the first name. This occured
in the subsequent list fields as well. Any way to get it to display just the
unique name value without the additional letters?

"ryguy7272" wrote:

> I think this will work for you:
> =LEFT(A1,FIND(" ",A1,1)-1)&RIGHT(A1,FIND(" ",A1,1)+2)
>
>
> Regards,
> Ryan---
>
> --
> RyGuy
>
>
> "kacey28" wrote:
>
> > I have a spreadsheet provided by an outsourced company that has duplicate
> > data within a single cell. For example, a cell with Name values will have
> > "Jerry White Jerry White" (twice), rather than once "Jerry White".
> >
> > When duplicate values appear in the same cell, how do you manage to clean
> > these up without manually deleting data in each individual cell? (Note - I
> > have several columns that contain various duplicated data.)
> >
> > Thanks in advance for any help!

 
Reply With Quote
 
kacey28
Guest
Posts: n/a
 
      23rd Jun 2008
Thank you, Dave. Your formula returned the same value as in the original
cell (i.e. duplicate data).

"Dave" wrote:

> Hi,
> This is a bit long-winded, but it's all I could think of.
> With the data to be examined in A2:
>
> =IF(MOD(LEN(A2),2)=1,IF(LEFT(A2,(LEN(A2)-1)/2)=RIGHT(A2,(LEN(A2)-1)/2),LEFT(A2,(LEN(A2)-1)/2),A2),A2)
>
> Copy down as required.
> Regards - Dave.

 
Reply With Quote
 
kacey28
Guest
Posts: n/a
 
      23rd Jun 2008
Ryan - additional information. I finally disected your formula to understand
you are giving the find function a starting position within the text of the
field.

Would this formula work when there are variying duplicate names, or other
values, that each have seperate starting positions withing the text
throughout a column?

"ryguy7272" wrote:

> I think this will work for you:
> =LEFT(A1,FIND(" ",A1,1)-1)&RIGHT(A1,FIND(" ",A1,1)+2)
>
>
> Regards,
> Ryan---
>
> --
> RyGuy
>
>
> "kacey28" wrote:
>
> > I have a spreadsheet provided by an outsourced company that has duplicate
> > data within a single cell. For example, a cell with Name values will have
> > "Jerry White Jerry White" (twice), rather than once "Jerry White".
> >
> > When duplicate values appear in the same cell, how do you manage to clean
> > these up without manually deleting data in each individual cell? (Note - I
> > have several columns that contain various duplicated data.)
> >
> > Thanks in advance for any help!

 
Reply With Quote
 
Dave
Guest
Posts: n/a
 
      23rd Jun 2008
Hi,
My formula works ok for me. Try typing Jerry White Jerry White into A2 and
apply the formula.
Does your data have leading or trailing spaces that you're not telling us
about?
Regards - Dave.
 
Reply With Quote
 
Nita Carmicle
Guest
Posts: n/a
 
      24th Jun 2008
Have you tried 'Text to Column"? If you go to Data and select 'Text to
Columns' it will sort each first and last name into separate columns and you
can delete the unnecessary columns. This is just a quick fix, but it works.
--
Nita Carmicle
Cleveland, OH


"kacey28" wrote:

> I have a spreadsheet provided by an outsourced company that has duplicate
> data within a single cell. For example, a cell with Name values will have
> "Jerry White Jerry White" (twice), rather than once "Jerry White".
>
> When duplicate values appear in the same cell, how do you manage to clean
> these up without manually deleting data in each individual cell? (Note - I
> have several columns that contain various duplicated data.)
>
> Thanks in advance for any help!

 
Reply With Quote
 
kacey28
Guest
Posts: n/a
 
      24th Jun 2008
Thank you, Nita.

"Nita Carmicle" wrote:

> Have you tried 'Text to Column"? If you go to Data and select 'Text to
> Columns' it will sort each first and last name into separate columns and you
> can delete the unnecessary columns. This is just a quick fix, but it works.
> --
> Nita Carmicle
> Cleveland, OH
>
>
> "kacey28" wrote:
>
> > I have a spreadsheet provided by an outsourced company that has duplicate
> > data within a single cell. For example, a cell with Name values will have
> > "Jerry White Jerry White" (twice), rather than once "Jerry White".
> >
> > When duplicate values appear in the same cell, how do you manage to clean
> > these up without manually deleting data in each individual cell? (Note - I
> > have several columns that contain various duplicated data.)
> >
> > Thanks in advance for any help!

 
Reply With Quote
 
kacey28
Guest
Posts: n/a
 
      24th Jun 2008
Dave, I wasn't aware spaces could cause a problem. Yes, the format that the
outsourced company uses in thier spreadsheet does include unnecessary leading
and trailing spaces.

Would it work best if I run the Trim function and then run your formula from
the clean data?

"Dave" wrote:

> Hi,
> My formula works ok for me. Try typing Jerry White Jerry White into A2 and
> apply the formula.
> Does your data have leading or trailing spaces that you're not telling us
> about?
> Regards - Dave.

 
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
consolidate data (i.e. a single cell) from multiple spreadsheets intoa single sheet James Sheriff Microsoft Excel Discussion 1 4th Aug 2010 03:56 PM
VBA to delete Duplicate Records (1 column), before which, non-duplicate data merged into remaining row EagleOne@discussions.microsoft.com Microsoft Excel Programming 6 20th Aug 2009 02:40 AM
Delete Duplicate data row wise from each cell tarone@gmail.com Microsoft Excel Programming 2 30th Jan 2007 02:30 AM
delete duplicate data in the same cell elaine Microsoft Excel Programming 6 13th Dec 2006 04:55 PM
Delete duplicate data in SAME CELL Tom Microsoft Excel Worksheet Functions 5 4th Jul 2003 10:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:25 PM.