Page 1 of 1

[Solved] Consecutive List of Numbers

Posted: Thu Mar 07, 2013 7:07 pm
by Daliah
I have to create 18,000 bar codes in consecutive incremental numbers. I was wondering if anyone knew of a better way to do this than just drag down to 18,000. Maybe something automatic.

Re: Consecutive List of Numbers

Posted: Thu Mar 07, 2013 7:42 pm
by acknak
Select a column
Edit > Fill > Series
Start: 1
End: 18000
OK

Re: Consecutive List of Numbers

Posted: Thu Mar 07, 2013 7:50 pm
by Daliah
Thank you thank you thank you

Re: [Solved] Consecutive List of Numbers

Posted: Fri Apr 19, 2013 4:43 pm
by Daliah
Edit>Fill>Series works great for numbers. But what if I need to have an *123445*, then it doesn't seem to work. Any ideas on how to do this. I would just drag down the column, but I need 54,000. It takes a second to do the series with no *.

Re: [Solved] Consecutive List of Numbers

Posted: Fri Apr 19, 2013 5:14 pm
by MrProgrammer
Use Edit > Fill > Series to create the numbers. Use Format > Cells > Number > Format Code > "*"0"*" to add the asterisks.

The cell values will be the numbers but they will be displayed with asterisks as explained in section 2. Controlling how data is displayed of Ten concepts that every Calc user should know. If your barcode process requires the cell values to contain the asterisks, insert them with Data > Text to Columns using field type Text. Then, since your cells have text, set Format > Cells > Number > Category > Text so that Calc won't use the apostrophe indicator when you view those cells in the Formula Bar.

If this answered your question please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.

Re: [Solved] Consecutive List of Numbers

Posted: Fri Apr 19, 2013 5:50 pm
by Daliah
Thank you. Took me a while to figure this out, but finally worked. I didn't realize I needed the " before and after the *, exactly as you have it written.

Interestingly, I have no idea if the asterisks are required in the way you mention, or if I've just been putting them there and they do nothing. It is for a customer and so far the codes with asterisks have worked. I assumed that putting them there meant they were part of the barcode, but from what you say, it sounds like they are actually doing nothing since I have never done anything close to what you've explained.

In the past I just dragged the column down till I got to where I needed to be. This time I needed too many numbers to do that and it also wasn't working, it was just repeating the few rows as I went and not going consecutively up. At least not with the * in place, only without it.

I appreciate your help.

Re: [Solved] Consecutive List of Numbers

Posted: Fri Apr 19, 2013 6:48 pm
by acknak
Data > Text to Columns is probably the easiest way to make a mass change from number to text, but you could also use Edit > Find & Replace to add the asterisks, or use a formula in another column to construct a text value from the number.

I would recommend that you go ahead and use one of these methods to convert the codes into text. It's much safer to keep things like ID codes as plain text in Calc; when Calc stores a number, it is quite possible for Calc to take liberties with changing the stored value in a way that is correct for numeric values but completely wrong for textual numbers like bar codes and ID numbers. For example, discarding leading zeros.

I make it a rule for any sheet that I work with that such strings of digits are always kept as text, so that Calc does not suddenly decide to fiddle with them behind my back.