Feb 06 2024 05:42 AM
Hi
Please can someone in the community help.
I have some data in a formatted table and I am looking for a suitable formula that will help me with the following:
Column C contains a list of invoice numbers. These need to start at 4733.
Column J shows the status of the transaction. The input can be selected from a dropdown list.
If the selected input in an individual cell in Column J is "Under Offer", or "Negotiating", then I want the corresponding cell in Column C to show "Pending", however, if the input in Column J is "Completed", or "Let", or "Sold", then I want the corresponding cell in Column C to show an invoice number which will start in cell C1 with "4733".
Please can someone help me with some guidance on the structure of the formula I need.
Many thanks
Sincerely
Phil Richards
Feb 06 2024 06:02 AM
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
Feb 06 2024 12:52 PM
Feb 06 2024 01:38 PM
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"))
Feb 07 2024 04:22 AM
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
Feb 07 2024 05:07 AM
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"))
Feb 09 2024 01:19 AM
Feb 09 2024 05:34 AM
Feb 09 2024 05:57 AM