Edited
I'm sorry I didn't post it right the first time. The solutions suggested worked if there were only two entries of each Lead ID with Lead Status "A". I am changing my data. I again apologize.
Data:
Lead ID Lead Status Duration Target
1-1H9C0XL Too Small -0.466177 1
1-1H9G33C A -0.620709 0
1-1H9G33C A -0.500709 0
1-1H9G33C A 0.337401 0
4-1HFORF8 No Fit -0.343840 1
4-1HFSXOG No Fit -0.124920 1
4-1HLQ2IJ A -0.330962 0
4-1HLQ2IJ A 0.130818 0
4-1HLQ2IJ A -0.400817 0
4-1HLQ2IJ A 0.240818 0
I want to accomplish following:
If there is a duplicate in the Lead ID and Lead Status, make all the Target values "1" for that LeadID with shorter Duration.
Desired Output
Lead ID Lead Status Duration Target
1-1H9C0XL Too Small -0.466177 1
1-1H9G33C A -0.620709 1
1-1H9G33C A -0.500709 1
1-1H9G33C A 0.337401 0
4-1HFORF8 No Fit -0.343840 1
4-1HFSXOG No Fit -0.124920 1
4-1HLQ2IJ A -0.330962 1
4-1HLQ2IJ A 0.130818 1
4-1HLQ2IJ A -0.400817 1
4-1HLQ2IJ A 0.240818 0
I am not able to implement a condition of checking for duplicates and the value in duration to update the last column. I appreciate any assistance a lot.