ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting Duplicate Rows containing a value matching with a value f (https://www.excelbanter.com/excel-programming/429247-deleting-duplicate-rows-containing-value-matching-value-f.html)

emil

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


Patrick Molloy

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


emil

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


Patrick Molloy

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


emil

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



All times are GMT +1. The time now is 12:02 AM.

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