I am trying to a Rank IF Statement to rank all Like entries based off their date to be produced. Below is a sample of what I am trying to rank however I just can't seem to get it to work. Thanks in advance for all the assistance.
If status is "Clear to Pack" then rank "X1" Line using the date due, and use for each additional line.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]RANK[/TD]
[TD]ORDER[/TD]
[TD]LINE[/TD]
[TD]DATE DUE[/TD]
[TD]STATUS[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]CLA126[/TD]
[TD]X1[/TD]
[TD]7/26/16[/TD]
[TD]CLEAR TO PACK[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]RAF154[/TD]
[TD]X2[/TD]
[TD]7/25/16[/TD]
[TD]NOT READY[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]RTS025[/TD]
[TD]X4[/TD]
[TD]8/1/16[/TD]
[TD]NOT READY[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]TOP111[/TD]
[TD]X3[/TD]
[TD]7/20/16[/TD]
[TD]CLEAR TO PACK[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]WET000[/TD]
[TD]X3[/TD]
[TD]7/30/16[/TD]
[TD]CLEAR TO PACK[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]ERI090[/TD]
[TD]X3[/TD]
[TD]8/1/16[/TD]
[TD]NOT READY[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]KRY451[/TD]
[TD]X5[/TD]
[TD]7/27/16[/TD]
[TD]NOT READY[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]DAD191[/TD]
[TD]X5[/TD]
[TD]7/16/16[/TD]
[TD]NOT READY[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]EAW165[/TD]
[TD]X7[/TD]
[TD]8/3/16[/TD]
[TD]CLEAR TO PACK[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]EAD111[/TD]
[TD]X6[/TD]
[TD]8/3/16[/TD]
[TD]CLEAR TO PACK[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]POP135[/TD]
[TD]X1[/TD]
[TD]7/27/16[/TD]
[TD]NOT READY[/TD]
[/TR]
</tbody>[/TABLE]
If status is "Clear to Pack" then rank "X1" Line using the date due, and use for each additional line.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]RANK[/TD]
[TD]ORDER[/TD]
[TD]LINE[/TD]
[TD]DATE DUE[/TD]
[TD]STATUS[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]CLA126[/TD]
[TD]X1[/TD]
[TD]7/26/16[/TD]
[TD]CLEAR TO PACK[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]RAF154[/TD]
[TD]X2[/TD]
[TD]7/25/16[/TD]
[TD]NOT READY[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]RTS025[/TD]
[TD]X4[/TD]
[TD]8/1/16[/TD]
[TD]NOT READY[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]TOP111[/TD]
[TD]X3[/TD]
[TD]7/20/16[/TD]
[TD]CLEAR TO PACK[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]WET000[/TD]
[TD]X3[/TD]
[TD]7/30/16[/TD]
[TD]CLEAR TO PACK[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]ERI090[/TD]
[TD]X3[/TD]
[TD]8/1/16[/TD]
[TD]NOT READY[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]KRY451[/TD]
[TD]X5[/TD]
[TD]7/27/16[/TD]
[TD]NOT READY[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]DAD191[/TD]
[TD]X5[/TD]
[TD]7/16/16[/TD]
[TD]NOT READY[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]EAW165[/TD]
[TD]X7[/TD]
[TD]8/3/16[/TD]
[TD]CLEAR TO PACK[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]EAD111[/TD]
[TD]X6[/TD]
[TD]8/3/16[/TD]
[TD]CLEAR TO PACK[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]POP135[/TD]
[TD]X1[/TD]
[TD]7/27/16[/TD]
[TD]NOT READY[/TD]
[/TR]
</tbody>[/TABLE]