# Conditionally removing duplicates

#### aviktora

##### New Member
I'm looking for a way to identify the highest valued Job ID (Column B) for each of the Incident Numbers (Column A). I need to flag the row with the highest value so that I can easily delete the other rows. Rows to keep are in Green.

Here is the data:

Column A Column B
 Incident Number Job Id NAME CURRENT_STAT 548234 1237479 06.005 CRAFT RD (914) - RE Retrieved 548234 1237353 06.005 CRAFT RD (914) - RE Retrieved 548234 1179216 06.005 CRAFT RD (914) - RE Retrieved 580870 1460187 07.002 KINGSTON ST (3089) - RE Retrieved 580870 1450542 07.002 KINGSTON ST (3089) - RE Retrieved 580870 1385586 07.002 KINGSTON ST (3089) Retrieved

<tbody>
</tbody>

### 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)

#### Weazel

##### Well-known Member
you can try this formula in conditional formatting.

select the range first though

Excel 2012
ABCD
1Incident NumberJob IdNAMECURRENT_STAT
2548234123747906.005 CRAFT RD (914) - RERetrieved
3548234123735306.005 CRAFT RD (914) - RERetrieved
4548234117921606.005 CRAFT RD (914) - RERetrieved
5580870146018707.002 KINGSTON ST (3089) - RERetrieved
6580870145054207.002 KINGSTON ST (3089) - RERetrieved
7580870138558607.002 KINGSTON ST (3089)Retrieved
8#VALUE!=\$B2=MAX(IF(\$A\$2:\$A\$7=\$A2,\$B\$2:\$B\$7))

<tbody>
</tbody>
Sheet6

Worksheet Formulas
CellFormula
B8=\$B2=MAX(IF(\$A\$2:\$A\$7=\$A2,\$B\$2:\$B\$7))

<tbody>
</tbody>

<tbody>
</tbody>

#### aviktora

##### New Member
you can try this formula in conditional formatting.

select the range first though

Excel 2012
ABCD
1Incident NumberJob IdNAMECURRENT_STAT
2548234123747906.005 CRAFT RD (914) - RERetrieved
3548234123735306.005 CRAFT RD (914) - RERetrieved
4548234117921606.005 CRAFT RD (914) - RERetrieved
5580870146018707.002 KINGSTON ST (3089) - RERetrieved
6580870145054207.002 KINGSTON ST (3089) - RERetrieved
7580870138558607.002 KINGSTON ST (3089)Retrieved
8#VALUE!=\$B2=MAX(IF(\$A\$2:\$A\$7=\$A2,\$B\$2:\$B\$7))

<tbody>
</tbody>
Sheet6

Worksheet Formulas
CellFormula
B8=\$B2=MAX(IF(\$A\$2:\$A\$7=\$A2,\$B\$2:\$B\$7))

<tbody>
</tbody>

<tbody>
</tbody>

I changed the row number 7 to the end number in my dataset 4344. The formula seems to work for a while, but then there are gaps of about 200 rows that the conditional formatting seems to skip over. Any idea why?

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,164,629
Messages
5,838,454
Members
430,549
Latest member
jayjay2022

### 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.

### Which adblocker are you using?

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

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