I have three columns of data, Assignment, Category, and Amount. What I need is to find when the Category is equal to USOCOO, within each Assignment, then find the Category with the highest Amount, then change the "USOCOO" to the highest Category and change cell color to 0.799981688894314.
Here is a sample of data: (there are thousands of lines and Assignments). The Amount may or may not be sorted by largest to smallest.
[TABLE="class: grid, width: 231"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Assignment
[/TD]
[TD]Category
[/TD]
[TD]Amount
[/TD]
[TD]NEW CATEGORY
[/TD]
[/TR]
[TR]
[TD]2532315992[/TD]
[TD]USOSTM[/TD]
[TD] 13,060.00
[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2532315992[/TD]
[TD]USOCOO[/TD]
[TD] 151.44
[/TD]
[TD]USOSTM
[/TD]
[/TR]
[TR]
[TD]2532315992[/TD]
[TD]USOSTM[/TD]
[TD] 119.06[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2532315992[/TD]
[TD]USOCOO[/TD]
[TD] 1.38[/TD]
[TD]USOSTM
[/TD]
[/TR]
[TR]
[TD]2533369197[/TD]
[TD]USODIG[/TD]
[TD] 49,934.62[/TD]
[TD]unchanged[/TD]
[/TR]
[TR]
[TD]2533369197[/TD]
[TD]USOCOO[/TD]
[TD] 3,496.50[/TD]
[TD]USODIG
[/TD]
[/TR]
[TR]
[TD]2533369197[/TD]
[TD]USOPHF[/TD]
[TD] 15.38[/TD]
[TD]unchanged[/TD]
[/TR]
[TR]
[TD]2534243856[/TD]
[TD]USOVAL[/TD]
[TD] 840.00[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534243856[/TD]
[TD]USOMIV[/TD]
[TD] 45.00[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534243856[/TD]
[TD]USOCOO[/TD]
[TD] 3.87[/TD]
[TD]USOVAL
[/TD]
[/TR]
[TR]
[TD]2534259251[/TD]
[TD]USODIG[/TD]
[TD] 365.04[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534259251[/TD]
[TD]USOMBR[/TD]
[TD] 33.73[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534259251[/TD]
[TD]USOCOO[/TD]
[TD] 29.12[/TD]
[TD]USODIG
[/TD]
[/TR]
[TR]
[TD]2534259251[/TD]
[TD]USOPHF[/TD]
[TD] 0.11[/TD]
[TD]unchanged[/TD]
[/TR]
[TR]
[TD]2534259360[/TD]
[TD]USOMBR[/TD]
[TD] 8,750.00[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534259360[/TD]
[TD]USOMBR[/TD]
[TD] 175.00[/TD]
[TD]unchanged[/TD]
[/TR]
[TR]
[TD]2534259360[/TD]
[TD]USOCOO[/TD]
[TD] 23.74[/TD]
[TD]USOMBR
[/TD]
[/TR]
[TR]
[TD]2534259360[/TD]
[TD]USOCOO[/TD]
[TD] 0.47[/TD]
[TD]USOMBR
[/TD]
[/TR]
[TR]
[TD]2534344017[/TD]
[TD]USOMIV[/TD]
[TD] 105.00[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534344017[/TD]
[TD]USOCOO[/TD]
[TD] 9.03[/TD]
[TD]MSOMIV
[/TD]
[/TR]
[TR]
[TD]2534384470[/TD]
[TD]USOSUN[/TD]
[TD] 1,675.00[/TD]
[TD]unchanged[/TD]
[/TR]
[TR]
[TD]2534384470[/TD]
[TD]USOCOO[/TD]
[TD] 12.69[/TD]
[TD]USOCOO
[/TD]
[/TR]
[TR]
[TD]2534402150
[/TD]
[TD]USOADV
[/TD]
[TD] 2,093.84[/TD]
[TD]unchanged[/TD]
[/TR]
[TR]
[TD]2534402150[/TD]
[TD]USOCOO[/TD]
[TD] 166.98[/TD]
[TD]USOADV[/TD]
[/TR]
[TR]
[TD]2534482508[/TD]
[TD]USOADV
[/TD]
[TD] 360.00
[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534482508[/TD]
[TD]USOMIV[/TD]
[TD] 105.00[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534482508[/TD]
[TD]USOCOO[/TD]
[TD] 19.65[/TD]
[TD]USOADV[/TD]
[/TR]
[TR]
[TD]2534571551[/TD]
[TD]USOCNV
[/TD]
[TD] 21,889.00[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534571551[/TD]
[TD]USOCOO[/TD]
[TD] 234.18[/TD]
[TD]USOCNV
[/TD]
[/TR]
[TR]
[TD]2534678375[/TD]
[TD]USOCNV
[/TD]
[TD] 779.00[/TD]
[TD]unchanged[/TD]
[/TR]
[TR]
[TD]2534678375[/TD]
[TD]USOCOO
[/TD]
[TD] 56.48[/TD]
[TD]USOCNV
[/TD]
[/TR]
[TR]
[TD]2534848168[/TD]
[TD]USODIG
[/TD]
[TD] 9,687.02[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534848168[/TD]
[TD]USOMIV[/TD]
[TD] 4,134.00[/TD]
[TD]unchanged[/TD]
[/TR]
[TR]
[TD]2534848168[/TD]
[TD]USOPST[/TD]
[TD] 3,430.00[/TD]
[TD]unchanged[/TD]
[/TR]
[TR]
[TD]2534848168[/TD]
[TD]USOCOO[/TD]
[TD] 793.83[/TD]
[TD]USODIG[/TD]
[/TR]
[TR]
[TD]2534848168[/TD]
[TD]USOPHF[/TD]
[TD] 2.98[/TD]
[TD]unchanged[/TD]
[/TR]
</tbody>[/TABLE]
Thank you for your help!!
Here is a sample of data: (there are thousands of lines and Assignments). The Amount may or may not be sorted by largest to smallest.
[TABLE="class: grid, width: 231"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Assignment
[/TD]
[TD]Category
[/TD]
[TD]Amount
[/TD]
[TD]NEW CATEGORY
[/TD]
[/TR]
[TR]
[TD]2532315992[/TD]
[TD]USOSTM[/TD]
[TD] 13,060.00
[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2532315992[/TD]
[TD]USOCOO[/TD]
[TD] 151.44
[/TD]
[TD]USOSTM
[/TD]
[/TR]
[TR]
[TD]2532315992[/TD]
[TD]USOSTM[/TD]
[TD] 119.06[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2532315992[/TD]
[TD]USOCOO[/TD]
[TD] 1.38[/TD]
[TD]USOSTM
[/TD]
[/TR]
[TR]
[TD]2533369197[/TD]
[TD]USODIG[/TD]
[TD] 49,934.62[/TD]
[TD]unchanged[/TD]
[/TR]
[TR]
[TD]2533369197[/TD]
[TD]USOCOO[/TD]
[TD] 3,496.50[/TD]
[TD]USODIG
[/TD]
[/TR]
[TR]
[TD]2533369197[/TD]
[TD]USOPHF[/TD]
[TD] 15.38[/TD]
[TD]unchanged[/TD]
[/TR]
[TR]
[TD]2534243856[/TD]
[TD]USOVAL[/TD]
[TD] 840.00[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534243856[/TD]
[TD]USOMIV[/TD]
[TD] 45.00[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534243856[/TD]
[TD]USOCOO[/TD]
[TD] 3.87[/TD]
[TD]USOVAL
[/TD]
[/TR]
[TR]
[TD]2534259251[/TD]
[TD]USODIG[/TD]
[TD] 365.04[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534259251[/TD]
[TD]USOMBR[/TD]
[TD] 33.73[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534259251[/TD]
[TD]USOCOO[/TD]
[TD] 29.12[/TD]
[TD]USODIG
[/TD]
[/TR]
[TR]
[TD]2534259251[/TD]
[TD]USOPHF[/TD]
[TD] 0.11[/TD]
[TD]unchanged[/TD]
[/TR]
[TR]
[TD]2534259360[/TD]
[TD]USOMBR[/TD]
[TD] 8,750.00[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534259360[/TD]
[TD]USOMBR[/TD]
[TD] 175.00[/TD]
[TD]unchanged[/TD]
[/TR]
[TR]
[TD]2534259360[/TD]
[TD]USOCOO[/TD]
[TD] 23.74[/TD]
[TD]USOMBR
[/TD]
[/TR]
[TR]
[TD]2534259360[/TD]
[TD]USOCOO[/TD]
[TD] 0.47[/TD]
[TD]USOMBR
[/TD]
[/TR]
[TR]
[TD]2534344017[/TD]
[TD]USOMIV[/TD]
[TD] 105.00[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534344017[/TD]
[TD]USOCOO[/TD]
[TD] 9.03[/TD]
[TD]MSOMIV
[/TD]
[/TR]
[TR]
[TD]2534384470[/TD]
[TD]USOSUN[/TD]
[TD] 1,675.00[/TD]
[TD]unchanged[/TD]
[/TR]
[TR]
[TD]2534384470[/TD]
[TD]USOCOO[/TD]
[TD] 12.69[/TD]
[TD]USOCOO
[/TD]
[/TR]
[TR]
[TD]2534402150
[/TD]
[TD]USOADV
[/TD]
[TD] 2,093.84[/TD]
[TD]unchanged[/TD]
[/TR]
[TR]
[TD]2534402150[/TD]
[TD]USOCOO[/TD]
[TD] 166.98[/TD]
[TD]USOADV[/TD]
[/TR]
[TR]
[TD]2534482508[/TD]
[TD]USOADV
[/TD]
[TD] 360.00
[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534482508[/TD]
[TD]USOMIV[/TD]
[TD] 105.00[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534482508[/TD]
[TD]USOCOO[/TD]
[TD] 19.65[/TD]
[TD]USOADV[/TD]
[/TR]
[TR]
[TD]2534571551[/TD]
[TD]USOCNV
[/TD]
[TD] 21,889.00[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534571551[/TD]
[TD]USOCOO[/TD]
[TD] 234.18[/TD]
[TD]USOCNV
[/TD]
[/TR]
[TR]
[TD]2534678375[/TD]
[TD]USOCNV
[/TD]
[TD] 779.00[/TD]
[TD]unchanged[/TD]
[/TR]
[TR]
[TD]2534678375[/TD]
[TD]USOCOO
[/TD]
[TD] 56.48[/TD]
[TD]USOCNV
[/TD]
[/TR]
[TR]
[TD]2534848168[/TD]
[TD]USODIG
[/TD]
[TD] 9,687.02[/TD]
[TD]unchanged
[/TD]
[/TR]
[TR]
[TD]2534848168[/TD]
[TD]USOMIV[/TD]
[TD] 4,134.00[/TD]
[TD]unchanged[/TD]
[/TR]
[TR]
[TD]2534848168[/TD]
[TD]USOPST[/TD]
[TD] 3,430.00[/TD]
[TD]unchanged[/TD]
[/TR]
[TR]
[TD]2534848168[/TD]
[TD]USOCOO[/TD]
[TD] 793.83[/TD]
[TD]USODIG[/TD]
[/TR]
[TR]
[TD]2534848168[/TD]
[TD]USOPHF[/TD]
[TD] 2.98[/TD]
[TD]unchanged[/TD]
[/TR]
</tbody>[/TABLE]
Thank you for your help!!