HELLO, I ALREADY HAD SPEND TO MUCH TIME TRYING TO FIND THIS FORMULA FOR MY OWN,
SO I DECIDED TO ELEVATE THIS TO THE EXPERTS.
IM LOOKING FOR A FORMULA TO RANK INVOICES BASED ON STATUS AND DATE.

STATUS DATE RANK (must Be) RANK FORMULA
PAID 31-JAN-2019 6
PAST DUE 28-FEB-2019 1
PAST DUE 31-MAR-2019 2
DUE TODAY 30-ABR-2019 3
CURRENT 31-MAY-2019 4
CURRENT 30-JUN-2019 5


My arguments are the followings:
IF STATUS IS "PAID" RANK MUST BE THE LAST ONE
IF STATUS IS "PAST DUE" AND CELL DATE IS THE OLDEST FROM OTHER "PAST DUE" DATES, RANK FIRST
IF STATUS IS "DUE TODAY" AND THERE IS NOT ANY OTHER "PAST DUE", RANK FIRST
IF STATUS IS "CURRENT" AND THERE IS NOT ANY OTHER "PAST DUE", AND CURRENT DATE IS OLDEST FROM OTHER CURRENT, RANK FIRST


APRECIATE ANY HELP.