Find duplicates and highlight the bigger value

Rostuse

New Member
Joined
Jan 15, 2021
Messages
18
Office Version
  1. 2016
Platform
  1. Windows
Dears,

Hello, I would really appreciate it if you can help me out with this one.

As you can see in the sample, I have a table Phase for my articles to be made in separate machines, and how many peaces done by the same one.

In some cases, the same piece can be done in two separate machines, but in one machine you can make more pieces.

So I would like to highlight the highest number done.

Thank you.


Cycle Time.xlsx
ABCD
1PhaseArticleIDMachinePeaces done
2P1ID1M1150
3P1ID1M210
4P2ID1M3200
5P2ID2M3200
6P3ID2M4150
7P3ID2M450
8P4ID1M580
9P5ID1M670
Sheet1
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi,
For your Conditional Formatting, you can test
VBA Code:
=MAXIFS($D$2:$D$9,$A$2:$A$9,A2)=D2
 
Upvote 0
with the little explanation you gave, Just select the data from A2 to the last row and input this formula in conditional formatting

Excel Formula:
=$D2=MAX(IF($A$2:$A$9=$A2,$D$2:$D$9))
 

Attachments

  • 1675156117971.png
    1675156117971.png
    21.1 KB · Views: 4
Upvote 0
Hi,
For your Conditional Formatting, you can test
VBA Code:
=MAXIFS($D$2:$D$9,$A$2:$A$9,A2)=D2

Hello @James006, thank you, but it does not work.


with the little explanation you gave, Just select the data from A2 to the last row and input this formula in conditional formatting

Excel Formula:
=$D2=MAX(IF($A$2:$A$9=$A2,$D$2:$D$9))

Sorry for the lack of information @shinigamilight

Here is the actual table.

So, as you can see a piece can have various phases, and the same article can be done in two machines, but in one of them are made more pieces per article per phase.

My question is I want to filter let's say the same piece for the same phase and show the value of the machine that has produced more pieces.

Would be even better, to create a new column, and show the result of the bigger value of the article per phase, and the less to be shown as 0 or "FALSE", but also the article that is made in one machine to be shown its current number because not all articles are done by two machines.

EXAMPLE:
TEMPI_CICLO.xlsx
ABCDEF
13ArticlePhaseArticleNameMachineNameWorkingTimeQuantityRESULT
1420001ASA24310025010 QUICK E 100019731190190
1520001ASA24310025078 STUDER S335899350
1620001ASA41470167010 QUICK E 100014205100100
1720001ASA41470229078 STUDER S3360544040
1820001ASA41470556010 QUICK E 100024391717
1920001ASA41470556078 STUDER S3397660
Sheet1


Please ignore the Working time column, I need the results in Quantity.

I will appreciate for your help.


Cycle Time.xlsx
ABCDE
3ArticlePhaseArticleNameMachineNameWorkingTimeQuantity
420001ASA24310025010 QUICK E 100019731190
520001ASA24310025078 STUDER S33589935
620001ASA41470167010 QUICK E 100014205100
720001ASA41470229078 STUDER S33605440
820001ASA41470556010 QUICK E 1000243917
920001ASA41470556078 STUDER S339766
1020001ASA51600481078 STUDER S33285819
1120001ASA60670078078 STUDER S33170820
1220001ASAC03500131078 STUDER S33300710
1320001ASAC0350044078 STUDER S3316857120
1420001ASAC0350076078 STUDER S33506040
1520001ASAC0350077078 STUDER S33771441
1620001ASAC0350080010 QUICK E 10001181791
1720001ASAC0350080078 STUDER S331978861557
1820001ASAC0350081010 QUICK E 1000986968
1920001ASAC0350081078 STUDER S3355103330
2020001ASAC0410001078 STUDER S33358821127
2120001ASAC55K0002010 QUICK E 1000966354
2220001ASAC55K0002078 STUDER S3396993812
2320001ASAC55K0013010 QUICK E 10001351941
2420001ASAC55K0013078 STUDER S3334949208
2520001ASAC55K0014078 STUDER S331009337
2620001ASAC55P0002010 QUICK E 1000768531673
2720001ASAC55P0002078 STUDER S331274791306
2820001ASANC350362010 QUICK E 10001090057
2920002ASA24310022078 STUDER S33389339
3020002ASA31400140078 STUDER S33232211
3120002ASA31400310078 STUDER S3318399
3220002ASA31400400078 STUDER S3319625155
3320002ASA34310050078 STUDER S33020
3420002ASA24310025010 QUICK E 10009812198
3520002ASA24310025078 STUDER S3325236204
3620002ASA41470193078 STUDER S33621324
3720002ASA41470200078 STUDER S332502
3820002ASA41470205078 STUDER S3314880129
3920002ASA41470556078 STUDER S331042462
4020002ASAC0350047078 STUDER S33720540
4120002ASAC0350080010 QUICK E 100021078198
4220002ASAC0350080078 STUDER S335559013406
4320002ASAC0350081078 STUDER S3354572388
4420002ASAC0410001078 STUDER S331386491092
PVT varianza
 
Upvote 0
ctrl shift enter while entering this formula

Excel Formula:
=IF(COUNTIFS($B$4:$B$44,B4)=1,E4,IF(E4=MAX(IF($B$4:$B$44=B4,$E$4:$E$44)),E4,0))
 

Attachments

  • 1675172849916.png
    1675172849916.png
    55.5 KB · Views: 4
Upvote 0
ctrl shift enter while entering this formula

Excel Formula:
=IF(COUNTIFS($B$4:$B$44,B4)=1,E4,IF(E4=MAX(IF($B$4:$B$44=B4,$E$4:$E$44)),E4,0))
Thank you @shinigamilight , but it needs to show the bigger value of the of the same article, and the small one to be 0, in this case both are 0.

In your example E4 and E5.
F4 needs to be 190 and F5 0.

Thank you so much for trying, I really appreciate.
 
Upvote 0
Did you even try the formula , first paste it in your workbook then you will realise why is that the case. It was tested on the bigger table not the smaller one.
 
Upvote 0
Did you even try the formula , first paste it in your workbook then you will realise why is that the case. It was tested on the bigger table not the smaller one.
Yes I did try it, but I got the same result as you have on the screenshot.

The first article for both machines is 0,0.

Thanks
 
Upvote 0
Book1
ABCDEF
3ArticlePhaseArticleNameMachineNameWorkingTimeQuantityRESULT
420001ASA24310025010 QUICK E 1000197311900
520001ASA24310025078 STUDER S335899350
620001ASA41470167010 QUICK E 100014205100100
720001ASA41470229078 STUDER S3360544040
820001ASA41470556010 QUICK E 10002439170
920001ASA41470556078 STUDER S3397660
1020001ASA51600481078 STUDER S3328581919
1120001ASA60670078078 STUDER S3317082020
1220001ASAC03500131078 STUDER S3330071010
1320001ASAC0350044078 STUDER S3316857120120
1420001ASAC0350076078 STUDER S3350604040
1520001ASAC0350077078 STUDER S3377144141
1620001ASAC0350080010 QUICK E 100011817910
1720001ASAC0350080078 STUDER S3319788615570
1820001ASAC0350081010 QUICK E 10009869680
1920001ASAC0350081078 STUDER S33551033300
2020001ASAC0410001078 STUDER S333588211271127
2120001ASAC55K0002010 QUICK E 10009663540
2220001ASAC55K0002078 STUDER S3396993812812
2320001ASAC55K0013010 QUICK E 100013519410
2420001ASAC55K0013078 STUDER S3334949208208
2520001ASAC55K0014078 STUDER S33100933737
2620001ASAC55P0002010 QUICK E 10007685316731673
2720001ASAC55P0002078 STUDER S3312747913060
2820001ASANC350362010 QUICK E 1000109005757
2920002ASA24310022078 STUDER S3338933939
3020002ASA31400140078 STUDER S3323221111
3120002ASA31400310078 STUDER S33183999
3220002ASA31400400078 STUDER S3319625155155
3320002ASA34310050078 STUDER S3302020
3420002ASA24310025010 QUICK E 100098121980
3520002ASA24310025078 STUDER S3325236204204
3620002ASA41470193078 STUDER S3362132424
3720002ASA41470200078 STUDER S3325022
3820002ASA41470205078 STUDER S3314880129129
3920002ASA41470556078 STUDER S33104246262
4020002ASAC0350047078 STUDER S3372054040
4120002ASAC0350080010 QUICK E 1000210781980
4220002ASAC0350080078 STUDER S3355590134063406
4320002ASAC0350081078 STUDER S3354572388388
4420002ASAC0410001078 STUDER S3313864910920
Sheet1
Cell Formulas
RangeFormula
F4:F44F4=IF(AND(COUNTIF($B$4:$B$44,B4)>0,MAXIFS($E$4:$E$44,$B$4:$B$44,A4)=E4),E4,IF(AND(COUNTIF($B$4:$B$44,B4)>0,MAXIFS($E$4:$E$44,$B$4:$B$44,B4)<>E4),0,E4))
 
Upvote 0

Forum statistics

Threads
1,215,490
Messages
6,125,094
Members
449,205
Latest member
ralemanygarcia

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