Forum Discussion
rshenk3
Oct 05, 2023Copper Contributor
Automatic Carton Numbering
Hello and thank you, So here's the deal. I have a spreadsheet with the entire selection of possible products ordered from us by a customer. I would like to be able to receive a PO from the cust...
- Oct 07, 2023
rshenk3
Like this?If that's the case, then we change the initial value in SCAN from 1 to 0:
=LET( carton_numbering, LAMBDA(a, v, IF( v = "", TEXTAFTER(a, ",", -1, , , a), TEXTJOIN(",", , SEQUENCE(v, , a + 1)) ) ), SCAN(0, boxes, carton_numbering) )
Patrick2788
Oct 07, 2023Silver Contributor
First, I will be deleting unused rows, even potentially what is now row 2, from the spreadsheet after filling in the requested quantities in column R from the PO. Does this mean I would apply the formula to both column U and column H after I have deleted the rows?
Yes, if you delete row 2 (the row containing the two formulas) they would need to be re-applied.
Second, it does not appear to solve the problem of column H starting with the number 2.
Can you clarify what you're looking for here? In my workbook the numbering starts at 2:
rshenk3
Oct 07, 2023Copper Contributor
Yes, I need the "Box #'s" to start at 1.
- Patrick2788Oct 07, 2023Silver Contributor
rshenk3
Like this?If that's the case, then we change the initial value in SCAN from 1 to 0:
=LET( carton_numbering, LAMBDA(a, v, IF( v = "", TEXTAFTER(a, ",", -1, , , a), TEXTJOIN(",", , SEQUENCE(v, , a + 1)) ) ), SCAN(0, boxes, carton_numbering) )- rshenk3Oct 07, 2023Copper ContributorYes, that's it! Thank you so much for your help! Your solution is much more efficient and I will take what I learned here to future projects. thanks again!
- Patrick2788Oct 07, 2023Silver ContributorGlad to help. Good luck with the business!