A very particular way to select data

gregmartjim

New Member
Joined
Jun 14, 2018
Messages
9
Hello Mr Excel and everyone

I have a problem , i am trying to select some data from a set but in a very particular way.
the data i have is something like the data below, what id like to do is to delete the whole row if the number in the second column is repeated, but i want to keep the last repeated value and delete the other values above.

For example the first and second row have the same value in column 2 (the value is 1) i want to delete all the first row and just leave the second one. An other example, the rows 9 to 11 have the same value in column 2 (the value is 1 again) here i would like to delete row 9 & 10. Final example, the rows 3 and 4 have the same value (2) i would like to delete all row number 3 and keep row 4. I will really appreciate if someone could help me with this problem. Thanks for reading

[TABLE="width: 343"]
<colgroup><col span="4"><col></colgroup><tbody>[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.64[/TD]
[TD="align: right"]41.93[/TD]
[TD="align: right"]1274.895[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.66[/TD]
[TD="align: right"]41.12[/TD]
[TD="align: right"]1274.8375[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0.97[/TD]
[TD="align: right"]40.68[/TD]
[TD="align: right"]1290.7075[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0.93[/TD]
[TD="align: right"]41.88[/TD]
[TD="align: right"]1290.7075[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1.11[/TD]
[TD="align: right"]44.38[/TD]
[TD="align: right"]1311.235[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]0.83[/TD]
[TD="align: right"]41.92[/TD]
[TD="align: right"]1311.12[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1.18[/TD]
[TD="align: right"]42.83[/TD]
[TD="align: right"]1331.245[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1.58[/TD]
[TD="align: right"]43.26[/TD]
[TD="align: right"]1331.4175[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.57[/TD]
[TD="align: right"]54.07[/TD]
[TD="align: right"]1270.98[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.57[/TD]
[TD="align: right"]55.14[/TD]
[TD="align: right"]1270.98[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.68[/TD]
[TD="align: right"]56.19[/TD]
[TD="align: right"]1270.98[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0.52[/TD]
[TD="align: right"]53.8[/TD]
[TD="align: right"]1290.96[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0.56[/TD]
[TD="align: right"]53.36[/TD]
[TD="align: right"]1290.78[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]0.76[/TD]
[TD="align: right"]58.58[/TD]
[TD="align: right"]1310.94[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]0.64[/TD]
[TD="align: right"]56.7[/TD]
[TD="align: right"]1310.76[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]0.75[/TD]
[TD="align: right"]49.14[/TD]
[TD="align: right"]1331.1[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]0.8[/TD]
[TD="align: right"]46.67[/TD]
[TD="align: right"]1331.1[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.48[/TD]
[TD="align: right"]52.05[/TD]
[TD="align: right"]1271.34[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.52[/TD]
[TD="align: right"]51.57[/TD]
[TD="align: right"]1271.34[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.52[/TD]
[TD="align: right"]50.41[/TD]
[TD="align: right"]1271.34[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0.7[/TD]
[TD="align: right"]50.84[/TD]
[TD="align: right"]1291.14[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0.6[/TD]
[TD="align: right"]51.76[/TD]
[TD="align: right"]1291.14[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]0.69[/TD]
[TD="align: right"]54.79[/TD]
[TD="align: right"]1311.12[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]0.8[/TD]
[TD="align: right"]55.45[/TD]
[TD="align: right"]1311.12[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]0.83[/TD]
[TD="align: right"]51.36[/TD]
[TD="align: right"]1331.1[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1.05[/TD]
[TD="align: right"]52.73[/TD]
[TD="align: right"]1331.1[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.47[/TD]
[TD="align: right"]39.46[/TD]
[TD="align: right"]1271.0425[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.41[/TD]
[TD="align: right"]39.52[/TD]
[TD="align: right"]1270.985[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0.58[/TD]
[TD="align: right"]53.1[/TD]
[TD="align: right"]1290.995[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0.6[/TD]
[TD="align: right"]52.65[/TD]
[TD="align: right"]1290.995[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1.05[/TD]
[TD="align: right"]52.44[/TD]
[TD="align: right"]1311.12[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]0.98[/TD]
[TD="align: right"]53.37[/TD]
[TD="align: right"]1311.12[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1.07[/TD]
[TD="align: right"]48.86[/TD]
[TD="align: right"]1331.015[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1.1[/TD]
[TD="align: right"]47.46[/TD]
[TD="align: right"]1331.015[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.42[/TD]
[TD="align: right"]56.86[/TD]
[TD="align: right"]1270.98[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.44[/TD]
[TD="align: right"]54.53[/TD]
[TD="align: right"]1270.98[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0.42[/TD]
[TD="align: right"]50.12[/TD]
[TD="align: right"]1290.96[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0.43[/TD]
[TD="align: right"]51.05[/TD]
[TD="align: right"]1290.96[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]0.58[/TD]
[TD="align: right"]58.82[/TD]
[TD="align: right"]1310.76[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]0.54[/TD]
[TD="align: right"]57.63[/TD]
[TD="align: right"]1310.76[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]0.79[/TD]
[TD="align: right"]48.76[/TD]
[TD="align: right"]1331.1[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]0.79[/TD]
[TD="align: right"]48.21[/TD]
[TD="align: right"]1331.1[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
You can do this without a macro if you want, but if this is a recurring task I recommend the VBA route.

But manually for starters, assuming your data as you presented it starts in row 1, then in cell F2 enter and copy down
=IF(OR(B2=B1,B2<>B3),"X","")

Then filter column F for X

Then, select from the second visible row to the end of the filtered range, hit F5 > Special > Visible cells only > OK

Then from your Ribbon, select the Home tab > Delete > Delete sheet rows.

Finally, exit Filter mode and delete or clear column F.
 
Upvote 0
Hello Tom
Thanks for the answer, i am kind of lost, what should i put instead of the "X", also i need to do the same for all the values in column B, some times i got 2 some others i got more.

Regards
 
Upvote 0
The formula should be taken literally. You put the X in it just as I wrote.

This does evaluate column B and it does what you said in your first post: it deleted the rows you said you want to be deleted. On a copy of your workbook, try following the steps just as I wrote them, it should do what you said you want.
 
Upvote 0
well i tried as you told me but i just get an X in the column, this is a shorten version of the real data, i change the formula you gave me for this

one =IF(OR(D2=D3,D2<>D3),"X","") , and i put it in column H, notice that in H2 i just got an X.


[TABLE="width: 535"]
<colgroup><col span="6"><col><col></colgroup><tbody>[TR]
[TD]NNK6-027[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.64[/TD]
[TD="align: right"]41.93[/TD]
[TD="align: right"]1274.895[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]NNK6-027[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.66[/TD]
[TD="align: right"]41.12[/TD]
[TD="align: right"]1274.8375[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]NNK6-027[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0.97[/TD]
[TD="align: right"]40.68[/TD]
[TD="align: right"]1290.7075[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]NNK6-027[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0.93[/TD]
[TD="align: right"]41.88[/TD]
[TD="align: right"]1290.7075[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]NNK6-027[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1.11[/TD]
[TD="align: right"]44.38[/TD]
[TD="align: right"]1311.235[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]NNK6-027[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]0.83[/TD]
[TD="align: right"]41.92[/TD]
[TD="align: right"]1311.12[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]NNK6-027[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1.18[/TD]
[TD="align: right"]42.83[/TD]
[TD="align: right"]1331.245[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]NNK6-027[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1.58[/TD]
[TD="align: right"]43.26[/TD]
[TD="align: right"]1331.4175[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TA01-001[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.57[/TD]
[TD="align: right"]54.07[/TD]
[TD="align: right"]1270.98[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TA01-001[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.57[/TD]
[TD="align: right"]55.14[/TD]
[TD="align: right"]1270.98[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TA01-001[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.68[/TD]
[TD="align: right"]56.19[/TD]
[TD="align: right"]1270.98[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TA01-001[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0.52[/TD]
[TD="align: right"]53.8[/TD]
[TD="align: right"]1290.96[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TA01-001[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0.56[/TD]
[TD="align: right"]53.36[/TD]
[TD="align: right"]1290.78[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TA01-001[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]0.76[/TD]
[TD="align: right"]58.58[/TD]
[TD="align: right"]1310.94[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TA01-001[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]0.64[/TD]
[TD="align: right"]56.7[/TD]
[TD="align: right"]1310.76[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TA01-001[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]0.75[/TD]
[TD="align: right"]49.14[/TD]
[TD="align: right"]1331.1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TA01-001[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]0.8[/TD]
[TD="align: right"]46.67[/TD]
[TD="align: right"]1331.1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TA01-002[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.48[/TD]
[TD="align: right"]52.05[/TD]
[TD="align: right"]1271.34[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TA01-002[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.52[/TD]
[TD="align: right"]51.57[/TD]
[TD="align: right"]1271.34[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TA01-002[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.52[/TD]
[TD="align: right"]50.41[/TD]
[TD="align: right"]1271.34[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TA01-002[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0.7[/TD]
[TD="align: right"]50.84[/TD]
[TD="align: right"]1291.14[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TA01-002[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0.6[/TD]
[TD="align: right"]51.76[/TD]
[TD="align: right"]1291.14[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TA01-002[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]0.69[/TD]
[TD="align: right"]54.79[/TD]
[TD="align: right"]1311.12[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TA01-002[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]0.8[/TD]
[TD="align: right"]55.45[/TD]
[TD="align: right"]1311.12[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TA01-002[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]0.83[/TD]
[TD="align: right"]51.36[/TD]
[TD="align: right"]1331.1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TA01-002[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1.05[/TD]
[TD="align: right"]52.73[/TD]
[TD="align: right"]1331.1[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
@gregmartjim
Note that sometimes posts from new users require Moderator approval before you can see them on the public forums. When this happens, you should see a message to that effect when you try to post it.
Please be patient and do not attempt to post the question again.
 
Upvote 0
You changed the data range from your first post to involve more columns which is no big deal except that you did not adjust the formula accordingly.

You changed the formula to this:
Code:
=IF(OR(D2=D3,D2<>D3),"X","")
but it should have been changed to this:
Code:
=IF(OR(D2=[COLOR=#b22222][B]D1[/B][/COLOR],D2<>D3),"X","")

When you do that and follow the rest of the steps from my first post on this thread, you should get the result you said you want because it works for me.
 
Upvote 0
Thanks again Tom

It works nice when i have to select between 2 but not when i have 3 of the same, when this happens i get the x in the last two. herean example, from D3 to D5 i have the same number, and i would like to select just all the row from D5, right now i get D4 and D5. The column D i some times have two rows with the same number, some times 3, some times 4 or even more and i just want to select the last one.

Regards

[TABLE="width: 552"]
<colgroup><col span="6"><col><col></colgroup><tbody>[TR]
[TD]TA01-010[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.38[/TD]
[TD="align: right"]40.75[/TD]
[TD="align: right"]1270.9275[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]TA01-010[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0.54[/TD]
[TD="align: right"]39.16[/TD]
[TD="align: right"]1270.985[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD]TA01-010[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0.58[/TD]
[TD="align: right"]52.8[/TD]
[TD="align: right"]1291.0525[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]TA01-010[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0.61[/TD]
[TD="align: right"]50.39[/TD]
[TD="align: right"]1291.0525[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD]TA01-010[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0.67[/TD]
[TD="align: right"]50.9[/TD]
[TD="align: right"]1291.11[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD]TA01-010[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]0.86[/TD]
[TD="align: right"]54.9[/TD]
[TD="align: right"]1310.89[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]TA01-010[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1.09[/TD]
[TD="align: right"]55.09[/TD]
[TD="align: right"]1310.9475[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD]TA01-010[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]0.99[/TD]
[TD="align: right"]46.5[/TD]
[TD="align: right"]1330.6125[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]TA01-010[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]0.99[/TD]
[TD="align: right"]45.44[/TD]
[TD="align: right"]1330.6125[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD]TA01-010[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1.18[/TD]
[TD="align: right"]46.83[/TD]
[TD="align: right"]1330.6125[/TD]
[TD]x[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
If in cell H1 (notice, that's H1 this time, not H2) you enter this formula and copy it down, does it place the X's where it should, meaning for those rows where an X would be in column H are the same rows you want to delete, and where there are not X's are for rows you want to keep (I assume your word "select" is the same as keep).

Code:
=IF(OR(D1=D2,D2<>D3),"X","")
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top