Attachment has dummy list of clients in Col P, each of whom have a "credit period" in Col Q
Selecting the client from DropList in C6 triggers "index Match" to identify which Credit period to apply, based on the terms listed in Col Q
I have listed the permutations in I15 - I23 to make analysis simpler:
I15 - s/be blank unless Terms are "END OF WEEK" and invoice dated Mon - Thu. Should show payment due on Friday
=IF(AND(INDEX(Q2:Q27,MATCH(C6,P2:P27,0)="EOWEEK"),6-WEEKDAY(C4)>=1),C4+6-WEEKDAY(C4),"")
I17 - s/be blank unless Terms are "END OF WEEK" and Invoice dated Friday - Should show payment due following Friday
=IF(AND(INDEX(Q2:Q27,MATCH(C6,P2:P27,0)="EOWEEK"),6-WEEKDAY(C4)<1),C4+7+6-WEEKDAY(C4),"")
I19 - s/be Blank unless Terms are "END OF MONTH" - payment due last day of Invoice date month
=IF(INDEX(Q1:Q27,MATCH(C6,P1:P27,0))="EOMONTH",EOMONTH(C4,0),"")
I21 - s/be blank unless Terms are "MONTH" - payment due calendar month after invoice date
=IF(INDEX(Q1:Q27,MATCH(C6,P1:P27,0))="MONTH",DATE(YEAR(C4),MONTH(C4)+1,DAY(C4)),"")
I23 - s/be blank unless Terms are number of days - payment due number of days after invoice date
=IFERROR(INDEX(Q1:Q27,MATCH(C6,P1:P27,0))+C4,"")
Formula in C8 should combine the five options, and show the correct date against whichever credit terms matching the client in in C6, and the day the invoice was raised
Problem 1 is that the "End of Week" formulae are not working properly, and therefore the "combined" formula throws errors.
Any solution or pointers accepted gratefully as ever,
Ochimus
Bookmarks