Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Deleting Duplicate Rows containing a value matching with a value f

Delete Duplicate Rows containing more values matching with a value from a
cell located in other Range.
I searched the answer on Site http: Www. Cpearson.com Excel distinctvalues.
Aspx, as well as in another questions from this forum but I did not found the
answer.
Thanks for any helps
Emil

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Deleting Duplicate Rows containing a value matching with a value f

the key is how do you define a duplicate row?
i already answered a similar question.
my method was to add a key column which was the concatenated values of 10
columns. then we removed lines where we had duplicate keys.

think on this approach


"emil" wrote in message
...
Delete Duplicate Rows containing more values matching with a value from a
cell located in other Range.
I searched the answer on Site http: Www. Cpearson.com Excel
distinctvalues.
Aspx, as well as in another questions from this forum but I did not found
the
answer.
Thanks for any helps
Emil

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Deleting Duplicate Rows containing a value matching with a val

Hello
Patrick Molloy

Thank very much for your answer.
Delete Duplicate Rows
I believe that my question was not clear.
Here is an e.g.
I have a column (€œF: F€) with the values as strings:
Range (€œF1€).value = €œStr1€
Range (€œF2€).value = €œStr1€
Range (€œF3€).value = €œStr1€
Range (€œF4€).value = €œStr1€
Range (€œF5€).value = €œStr2€
Range (€œF6€).value = €œStr3€
Range (€œF7€).value = €œStr3€
Range (€œF8€).value = €œStr3€

- At the first running of procedure, Cell (€œA1€) has, the value €œStr1€, and
I will to erase the rows, which has the duplicates as €œStr1€ in column (€œF:
F€).
- At the second running of procedure, the value in Cell (€œA1€) changed to
€œStr2€. Because I have no duplicates in column (€œF: F€) for €œStr2€, do not
erased any rows.
- At the third running of procedure, the value in Cell (€œA1€) changed to
€œStr3€ and I will to erase the rows, which has the duplicates as €œStr3€ in
column (€œF: F€).
And so on, systematically.
How can I do this?
I thank once again for granted time!
Emil.


"Patrick Molloy" wrote:

the key is how do you define a duplicate row?
i already answered a similar question.
my method was to add a key column which was the concatenated values of 10
columns. then we removed lines where we had duplicate keys.

think on this approach


"emil" wrote in message
...
Delete Duplicate Rows containing more values matching with a value from a
cell located in other Range.
I searched the answer on Site http: Www. Cpearson.com Excel
distinctvalues.
Aspx, as well as in another questions from this forum but I did not found
the
answer.
Thanks for any helps
Emil

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Deleting Duplicate Rows containing a value matching with a val

if the values in F are sorted, then starting at the bottom, ie the
highest/largest row number , if the data in the cell in the next lower row
matches , then delete the row


for rw = range("F1").End(xlDown).Row to 2 step -1
if cells(rw,"F")=cells(rw-1,"F") then
rows(rw),delete
end if
next


"emil" wrote in message
...
Hello
Patrick Molloy

Thank very much for your answer.
Delete Duplicate Rows
I believe that my question was not clear.
Here is an e.g.
I have a column (€œF: F€) with the values as strings:
Range (€œF1€).value = €œStr1€
Range (€œF2€).value = €œStr1€
Range (€œF3€).value = €œStr1€
Range (€œF4€).value = €œStr1€
Range (€œF5€).value = €œStr2€
Range (€œF6€).value = €œStr3€
Range (€œF7€).value = €œStr3€
Range (€œF8€).value = €œStr3€

- At the first running of procedure, Cell (€œA1€) has, the value €œStr1€,
and
I will to erase the rows, which has the duplicates as €œStr1€ in column
(€œF:
F€).
- At the second running of procedure, the value in Cell (€œA1€) changed to
€œStr2€. Because I have no duplicates in column (€œF: F€) for €œStr2€, do not
erased any rows.
- At the third running of procedure, the value in Cell (€œA1€) changed to
€œStr3€ and I will to erase the rows, which has the duplicates as €œStr3€ in
column (€œF: F€).
And so on, systematically.
How can I do this?
I thank once again for granted time!
Emil.


"Patrick Molloy" wrote:

the key is how do you define a duplicate row?
i already answered a similar question.
my method was to add a key column which was the concatenated values of 10
columns. then we removed lines where we had duplicate keys.

think on this approach


"emil" wrote in message
...
Delete Duplicate Rows containing more values matching with a value from
a
cell located in other Range.
I searched the answer on Site http: Www. Cpearson.com Excel
distinctvalues.
Aspx, as well as in another questions from this forum but I did not
found
the
answer.
Thanks for any helps
Emil

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Deleting Duplicate Rows containing a value matching with a val

Thank you very much.
It is great. Works!
Thank you
Emil
"Patrick Molloy" wrote:

if the values in F are sorted, then starting at the bottom, ie the
highest/largest row number , if the data in the cell in the next lower row
matches , then delete the row


for rw = range("F1").End(xlDown).Row to 2 step -1
if cells(rw,"F")=cells(rw-1,"F") then
rows(rw),delete
end if
next


"emil" wrote in message
...
Hello
Patrick Molloy

Thank very much for your answer.
Delete Duplicate Rows
I believe that my question was not clear.
Here is an e.g.
I have a column (€œF: F€) with the values as strings:
Range (€œF1€).value = €œStr1€
Range (€œF2€).value = €œStr1€
Range (€œF3€).value = €œStr1€
Range (€œF4€).value = €œStr1€
Range (€œF5€).value = €œStr2€
Range (€œF6€).value = €œStr3€
Range (€œF7€).value = €œStr3€
Range (€œF8€).value = €œStr3€

- At the first running of procedure, Cell (€œA1€) has, the value €œStr1€,
and
I will to erase the rows, which has the duplicates as €œStr1€ in column
(€œF:
F€).
- At the second running of procedure, the value in Cell (€œA1€) changed to
€œStr2€. Because I have no duplicates in column (€œF: F€) for €œStr2€, do not
erased any rows.
- At the third running of procedure, the value in Cell (€œA1€) changed to
€œStr3€ and I will to erase the rows, which has the duplicates as €œStr3€ in
column (€œF: F€).
And so on, systematically.
How can I do this?
I thank once again for granted time!
Emil.


"Patrick Molloy" wrote:

the key is how do you define a duplicate row?
i already answered a similar question.
my method was to add a key column which was the concatenated values of 10
columns. then we removed lines where we had duplicate keys.

think on this approach


"emil" wrote in message
...
Delete Duplicate Rows containing more values matching with a value from
a
cell located in other Range.
I searched the answer on Site http: Www. Cpearson.com Excel
distinctvalues.
Aspx, as well as in another questions from this forum but I did not
found
the
answer.
Thanks for any helps
Emil



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
Deleting Duplicate Rows Jase4now Excel Programming 2 September 18th 07 08:18 AM
deleting duplicate rows Jess Excel Discussion (Misc queries) 3 January 9th 07 11:16 PM
Deleting duplicate rows Kevin Excel Discussion (Misc queries) 1 May 2nd 06 12:16 AM
Deleting duplicate rows vanessa h Excel Programming 4 January 23rd 06 12:26 PM
Deleting Duplicate Rows AllenR2 Excel Programming 4 September 11th 04 06:01 PM


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

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"