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]6
[/TD]
[TD]100%
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]C
[/TD]
[TD]24
[/TD]
[TD]20
[/TD]
[TD]83.3%
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]C
[/TD]
[TD]31
[/TD]
[TD]6
[/TD]
[TD]19.4%
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]D
[/TD]
[TD]14
[/TD]
[TD]19
[/TD]
[TD]135.7%
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]D
[/TD]
[TD]34
[/TD]
[TD]37
[/TD]
[TD]108.8%
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]D
[/TD]
[TD]24
[/TD]
[TD]24
[/TD]
[TD]100%
[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]D
[/TD]
[TD]26
[/TD]
[TD]13
[/TD]
[TD]50%
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Hello, I would like to rank a set of data by group and based on multiple criteria. I've given a sample below with the expected output in column E. For each group, I would like to rank by % Attainment (column D), and break ties with Actual (column C). Also, I would like the ranking to skip any line where the % Attainment is less than 100%, or where the Actual is less than 3. Any help would be greatly appreciated!
<tbody>[TR]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[/TR]
[TR]
[TD]GROUP
[/TD]
[TD]TARGET
[/TD]
[TD]ACTUAL
[/TD]
[TD]% ATTAINMENT
[/TD]
[TD]EXPECTED RANK
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]9
[/TD]
[TD]17
[/TD]
[TD]188.9%
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]7
[/TD]
[TD]13
[/TD]
[TD]185.7%
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]6
[/TD]
[TD]11
[/TD]
[TD]183.3%
[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]A
[/TD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D]13
[/TD]
[TD]50%
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Hello, I would like to rank a set of data by group and based on multiple criteria. I've given a sample below with the expected output in column E. For each group, I would like to rank by % Attainment (column D), and break ties with Actual (column C). Also, I would like the ranking to skip any line where the % Attainment is less than 100%, or where the Actual is less than 3. Any help would be greatly appreciated!