Forum Discussion
Excel formula
Let's say the data start in row 2.
In C2:
=IF(OR(J2={"Completed","Let","Sold"}), SUM(COUNTIF(J$2:J2, {"Completed","Let","Sold"}))+4732, "Pending")
Fill down
Many thanks
Phil
- HansVogelaarFeb 06, 2024MVP
Like this:
=IF(OR(J2={"Completed","Let","Sold"}), SUM(COUNTIF(J$2:J2, {"Completed","Let","Sold"}))+4732, IF(J2="Credit Note", "Credit Note 008", "Pending"))
- Phil_887Feb 07, 2024Copper Contributor
Hi Hans, You have been so very helpful.
My formula now reads:
=IF(OR(A2={"COMPLETED"}), SUM(COUNTIF(A$2:A2,{"COMPLETED"}))+4732, IF(A2="CREDIT NOTE", "CREDIT NOTE 008", "PENDING"))
How do I make a final adjustment so that when there is another credit note in the data set it comes up with the next number in the sequence i.e. credit note 009 and so on and so.
I really appreciate your input / assistance.
Regards
Phil
- HansVogelaarFeb 07, 2024MVP
Since you now only look at COMPLETED, part of the formula can be simplified.
=IF(A2="COMPLETED", COUNTIF(A$2:A2,"COMPLETED")+4732, IF(A2="CREDIT NOTE", "CREDIT NOTE "&TEXT(COUNTIF(A$2:A2, "CREDIT NOTE")+7, "000"), "PENDING"))