[Solved] Consecutive List of Numbers

Discuss the spreadsheet application
Post Reply
Daliah
Posts: 5
Joined: Thu Mar 07, 2013 5:28 pm

[Solved] Consecutive List of Numbers

Post 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.
Last edited by Daliah on Thu Mar 07, 2013 7:50 pm, edited 1 time in total.
OpenOffice 3.2.1
MacOS 10.6.8
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Consecutive List of Numbers

Post by acknak »

Select a column
Edit > Fill > Series
Start: 1
End: 18000
OK
AOO4/LO5 • Linux • Fedora 23
Daliah
Posts: 5
Joined: Thu Mar 07, 2013 5:28 pm

Re: Consecutive List of Numbers

Post by Daliah »

Thank you thank you thank you
OpenOffice 3.2.1
MacOS 10.6.8
Daliah
Posts: 5
Joined: Thu Mar 07, 2013 5:28 pm

Re: [Solved] Consecutive List of Numbers

Post 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 *.
OpenOffice 3.2.1
MacOS 10.6.8
User avatar
MrProgrammer
Moderator
Posts: 4895
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: [Solved] Consecutive List of Numbers

Post 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.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Daliah
Posts: 5
Joined: Thu Mar 07, 2013 5:28 pm

Re: [Solved] Consecutive List of Numbers

Post 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.
OpenOffice 3.2.1
MacOS 10.6.8
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Solved] Consecutive List of Numbers

Post 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.
AOO4/LO5 • Linux • Fedora 23
Post Reply