Add sequence number with blank rows

I’m sure this can be done, I just don’t know where to start. 


Using the example below.  If A is checked, then I want a sequence number in B (format CC-1, CC-2, etc.), each time the # is incremented by 1, or if C is checked then a sequence # is added to D (format OUC-1, OUC-2, etc.).


Thank you

MacBook Pro 15″, macOS 11.6

Posted on Oct 23, 2022 12:17 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 23, 2022 2:21 PM

Hello Marg0040,

You could try this.


B2= IF(A2,CONCATENATE("CC-",COUNTIF(A$2:A2,TRUE)),"")

D2=IF(C2,CONCATENATE("OUC-",COUNTIF(C$2:C2,TRUE)),"")


IF will check if the checkmarks is set and then create the text

COUNTIF will count the amount of checkmarks, you must preserve "$" the row2 for this to work.


Based on your region the , or the ; will be used to separate the different sections of a formula. If you write one thousand as 1,000.00 then the , is used as your formula separator. If you write one thousand as 1.000,00 then the ; is used as your formula separator.


Hope this will solve your question, please let me know if this worked for you or if something in unclear.


Regards Ralf

2 replies
Question marked as Top-ranking reply

Oct 23, 2022 2:21 PM in response to Marg0040

Hello Marg0040,

You could try this.


B2= IF(A2,CONCATENATE("CC-",COUNTIF(A$2:A2,TRUE)),"")

D2=IF(C2,CONCATENATE("OUC-",COUNTIF(C$2:C2,TRUE)),"")


IF will check if the checkmarks is set and then create the text

COUNTIF will count the amount of checkmarks, you must preserve "$" the row2 for this to work.


Based on your region the , or the ; will be used to separate the different sections of a formula. If you write one thousand as 1,000.00 then the , is used as your formula separator. If you write one thousand as 1.000,00 then the ; is used as your formula separator.


Hope this will solve your question, please let me know if this worked for you or if something in unclear.


Regards Ralf

Oct 23, 2022 5:46 PM in response to Marg0040

Just don't sort the table. It will number things differently (and will result in reference errors due to a bug in the app). The numbering will still be sequential (except for the error) but it might not be numbering the same rows. Below is the table before and after sorting by column B ascending. The right two columns show what the original values were for each row. When the rows moved, the OUC numbering got shuffled



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Add sequence number with blank rows

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.