Painzstake
New Member
- Joined
- Mar 25, 2014
- Messages
- 10
I have been working on this ranking problem for a while now. I've tried multiple combinations of COUNTIF and SUMPRODUCT, but I can't seem to get my formula to work! I thought I'd jump back into these forums to see if anybody was up for the challenge?
Problem: column C needs to contain dates ranked from column A. These dates are to be ranked by the groups in Column B in the following manner; if B is "Old", then rank as descending whole values; if B is "New", then rank as ascending decimal values; if B is "Posted", then leave blank.
For context: the final formula is going to be arrayed from C2.
This table shows the desired result:
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A
[/TD]
[TD="align: center"]B
[/TD]
[TD="align: center"]C
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Date
[/TD]
[TD]Is
[/TD]
[TD]Order
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
[TD]Old
[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
[TD]Posted
[/TD]
[TD]""
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
[TD]Posted
[/TD]
[TD]""
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
[TD]Old
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
[TD]Posted
[/TD]
[TD]""
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
[TD]Old
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
[TD]New
[/TD]
[TD].1
[/TD]
[/TR]
[TR]
[TD]9
[/TD]
[TD]<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
[TD]New
[/TD]
[TD].2
[/TD]
[/TR]
</tbody>[/TABLE]
Problem: column C needs to contain dates ranked from column A. These dates are to be ranked by the groups in Column B in the following manner; if B is "Old", then rank as descending whole values; if B is "New", then rank as ascending decimal values; if B is "Posted", then leave blank.
For context: the final formula is going to be arrayed from C2.
This table shows the desired result:
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A
[/TD]
[TD="align: center"]B
[/TD]
[TD="align: center"]C
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Date
[/TD]
[TD]Is
[/TD]
[TD]Order
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
10/02/2018 16:41:00
[/TD][TD]Old
[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
14/02/2018 18:02:00
[/TD][TD]Posted
[/TD]
[TD]""
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
17/02/2018 21:59:00
[/TD][TD]Posted
[/TD]
[TD]""
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
17/02/2018 22:40:00
[/TD][TD]Old
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
21/02/2018 22:49:00
[/TD][TD]Posted
[/TD]
[TD]""
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
22/02/2018 22:11:00
[/TD][TD]Old
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
24/02/2018 10:36:00
[/TD][TD]New
[/TD]
[TD].1
[/TD]
[/TR]
[TR]
[TD]9
[/TD]
[TD]<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
17/02/2018 20:36:00
[/TD][TD]New
[/TD]
[TD].2
[/TD]
[/TR]
</tbody>[/TABLE]