Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default removing duplicates in a row

I've got a spreadsheet with a description colunm. The current descriptions
have repeated partnumbers over and over throught the row. Is there something
I can use to leave the first two entries (left - right) and remove the rest.
Each row has a different part number duplicated. Example - HEWLETT PACKARD
OEM Q2624A HP - Toner Cartridges for HP LaserJet 1150 - Q2624A, Black, 2500,
Print Cartridge, Model No. Q2624A NEW OEM HP LaserJet 1150 Series Q2624A
HEWQ2624A Q2624A. I need it to look like this... HEWLETT PACKARD OEM Q2624A
HP - Toner Cartridges for HP LaserJet 1150 - Q2624A Black, 2500, Print
Cartridge, Model No. NEW OEM HP LaserJet 1150 Series HEWQ2624A.

Is this possible in Excel or Access?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,276
Default removing duplicates in a row

Hi,
Take a look at CPearson Web, go almost to the bottom to find your specific
case

http://www.cpearson.com/excel/deleting.htm

if this helps please click yes, thanks

"mccloud" wrote:

I've got a spreadsheet with a description colunm. The current descriptions
have repeated partnumbers over and over throught the row. Is there something
I can use to leave the first two entries (left - right) and remove the rest.
Each row has a different part number duplicated. Example - HEWLETT PACKARD
OEM Q2624A HP - Toner Cartridges for HP LaserJet 1150 - Q2624A, Black, 2500,
Print Cartridge, Model No. Q2624A NEW OEM HP LaserJet 1150 Series Q2624A
HEWQ2624A Q2624A. I need it to look like this... HEWLETT PACKARD OEM Q2624A
HP - Toner Cartridges for HP LaserJet 1150 - Q2624A Black, 2500, Print
Cartridge, Model No. NEW OEM HP LaserJet 1150 Series HEWQ2624A.

Is this possible in Excel or Access?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default removing duplicates in a row

this is not removing duplicate rows, but duplicates within a text string

its complex.
1) identify the 'code' you can use
MID( text, instrRev(text," ")+1)
this finds the first space from the end - assumes that the last piece of
text will be the code

2) count how many times the code appears in the text
3) replace all but the first and last code's with nulls

your example seems to have 3 codes still



"mccloud" wrote in message
...
I've got a spreadsheet with a description colunm. The current
descriptions
have repeated partnumbers over and over throught the row. Is there
something
I can use to leave the first two entries (left - right) and remove the
rest.
Each row has a different part number duplicated. Example - HEWLETT
PACKARD
OEM Q2624A HP - Toner Cartridges for HP LaserJet 1150 - Q2624A, Black,
2500,
Print Cartridge, Model No. Q2624A NEW OEM HP LaserJet 1150 Series Q2624A
HEWQ2624A Q2624A. I need it to look like this... HEWLETT PACKARD OEM
Q2624A
HP - Toner Cartridges for HP LaserJet 1150 - Q2624A Black, 2500, Print
Cartridge, Model No. NEW OEM HP LaserJet 1150 Series HEWQ2624A.

Is this possible in Excel or Access?

Thanks


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default removing duplicates in a row

How regular is your text? By that I mean, does the text you want to remove
**always** follow the letters OEM? If not, in what way can the text to be
removed be identified? I'm guessing it is not always the 4th "word" in as I
would expect other vendor's names to vary. Also, will the text always be
repeated twice (as your example shows) with all following references
removed? In other words, a single example doesn't give us enough information
upon which to decide how to handle your other data... unless you give us
some kind of "rules" about how all your data is structured.

--
Rick (MVP - Excel)


"mccloud" wrote in message
...
I've got a spreadsheet with a description colunm. The current
descriptions
have repeated partnumbers over and over throught the row. Is there
something
I can use to leave the first two entries (left - right) and remove the
rest.
Each row has a different part number duplicated. Example - HEWLETT
PACKARD
OEM Q2624A HP - Toner Cartridges for HP LaserJet 1150 - Q2624A, Black,
2500,
Print Cartridge, Model No. Q2624A NEW OEM HP LaserJet 1150 Series Q2624A
HEWQ2624A Q2624A. I need it to look like this... HEWLETT PACKARD OEM
Q2624A
HP - Toner Cartridges for HP LaserJet 1150 - Q2624A Black, 2500, Print
Cartridge, Model No. NEW OEM HP LaserJet 1150 Series HEWQ2624A.

Is this possible in Excel or Access?

Thanks


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default removing duplicates in a row

Data is random and there isn't any patterns.

"Rick Rothstein" wrote:

How regular is your text? By that I mean, does the text you want to remove
**always** follow the letters OEM? If not, in what way can the text to be
removed be identified? I'm guessing it is not always the 4th "word" in as I
would expect other vendor's names to vary. Also, will the text always be
repeated twice (as your example shows) with all following references
removed? In other words, a single example doesn't give us enough information
upon which to decide how to handle your other data... unless you give us
some kind of "rules" about how all your data is structured.

--
Rick (MVP - Excel)


"mccloud" wrote in message
...
I've got a spreadsheet with a description colunm. The current
descriptions
have repeated partnumbers over and over throught the row. Is there
something
I can use to leave the first two entries (left - right) and remove the
rest.
Each row has a different part number duplicated. Example - HEWLETT
PACKARD
OEM Q2624A HP - Toner Cartridges for HP LaserJet 1150 - Q2624A, Black,
2500,
Print Cartridge, Model No. Q2624A NEW OEM HP LaserJet 1150 Series Q2624A
HEWQ2624A Q2624A. I need it to look like this... HEWLETT PACKARD OEM
Q2624A
HP - Toner Cartridges for HP LaserJet 1150 - Q2624A Black, 2500, Print
Cartridge, Model No. NEW OEM HP LaserJet 1150 Series HEWQ2624A.

Is this possible in Excel or Access?

Thanks





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default removing duplicates in a row

Then it will be impossible to write code to handle the variations that can
exist (code needs to be able to make decisions, based on pre-established
rules, in order to operate)... if you cannot identify where in the text your
duplicated value will exist, or what *unique fixed* text might exist in
front or behind it, (so that the code can find the first example of it), nor
how many of them to preserve, then there is no way to write code that can do
what you want.

--
Rick (MVP - Excel)


"mccloud" wrote in message
...
Data is random and there isn't any patterns.

"Rick Rothstein" wrote:

How regular is your text? By that I mean, does the text you want to
remove
**always** follow the letters OEM? If not, in what way can the text to be
removed be identified? I'm guessing it is not always the 4th "word" in as
I
would expect other vendor's names to vary. Also, will the text always be
repeated twice (as your example shows) with all following references
removed? In other words, a single example doesn't give us enough
information
upon which to decide how to handle your other data... unless you give us
some kind of "rules" about how all your data is structured.

--
Rick (MVP - Excel)


"mccloud" wrote in message
...
I've got a spreadsheet with a description colunm. The current
descriptions
have repeated partnumbers over and over throught the row. Is there
something
I can use to leave the first two entries (left - right) and remove the
rest.
Each row has a different part number duplicated. Example - HEWLETT
PACKARD
OEM Q2624A HP - Toner Cartridges for HP LaserJet 1150 - Q2624A, Black,
2500,
Print Cartridge, Model No. Q2624A NEW OEM HP LaserJet 1150 Series
Q2624A
HEWQ2624A Q2624A. I need it to look like this... HEWLETT PACKARD OEM
Q2624A
HP - Toner Cartridges for HP LaserJet 1150 - Q2624A Black, 2500, Print
Cartridge, Model No. NEW OEM HP LaserJet 1150 Series HEWQ2624A.

Is this possible in Excel or Access?

Thanks




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
Removing Duplicates Help Scott Excel Discussion (Misc queries) 6 May 5th 09 03:58 AM
Removing duplicates Tdp Excel Discussion (Misc queries) 6 November 27th 08 12:33 AM
Removing Duplicates Danielle Excel Worksheet Functions 5 March 10th 06 07:56 PM
removing duplicates robhargreaves Excel Discussion (Misc queries) 1 July 24th 05 12:35 AM
Removing Duplicates sat Excel Programming 2 June 17th 05 10:15 PM


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