I am trying to type in and populate a list of consecutive numbers for animal eartags. However all the numbers start with a zero and it appears to be impossible to enter a number into an Excel (or Open Office) spreadsheet that begins with a zero. This number is essential though so there must be a way of getting it to stay there.
Any ideas?
EG tag number is 08607240790045
if I type that number in all I get is 8607240790045
Hmmm I had tried that. It doesn’t seem to work though. Should say, the numbers have to be then imported into a database so will need to behave as numbers (not sure if that is relevant though to the issue here)
Type a single quote, ie a ‘ before you type the number in
Sorry that won’t work as you want them to behave as numbers later in the database
What I think you need to do is type them in with a quote so you can see the zero – then use a formula in another cell to turn them into numbers so you can import those into the database, give me a second
When I say it doesn’t work. I can get the number to stay up with the zero at the start but I cannot then drag that number down to populate a list of 500 consecutive numbers
When I say it doesn’t work. I can get the number to stay up with the zero at the start but I cannot then drag that number down to populate a list of 500 consecutive numbers
😀
Classic creeping functionality in an IT project specification – ask for one thing then expand requirements .. then complain that it doesn’t work / contract price has gone up !
Are they all the same length?
If so select the column you are working on, select format cells and in the number tab you have a list of cell options.
Select ‘special’ and where there is a text box marked type: to the right, type in the number length as zeros (so for your example type 14 0’s) then whatever number you put in there will extend the leading zero’s to make it 14 long. If you were to drag down sequential numbers it puts the leading zeros in for you.
Have to do this all the time with our barcode numbers, works fine. A database will import them fine but won’t always take those leading zero’s into account though, so you might have to do a similar thing with that field to show them again if required. Easy enough in access, not sure on others.
Edit: img below shows where to go if you’re not familiar with excel and you can see it working if you look at the cell and cell entry field.
What @T100 says will work for what you want as will @slow’s solution but might be a bit complicated to do if you are not familiar with custom formatting
WOW, I thought there would be some EXCEL love on here and you didn’t dissapoint. Thanks for all the help guys. With a combination of your prompting and a bit of Googling I found a solution. Basically in Format >cell>number I clicked leading zeros back to zero and then forward again to 1. This gave a zero in the box next to it. I then typed # after the zero 15 times and it allowed me to keep the 16 figure number with a zero in front and I could drag down to populate the list. I have now sucessfully imported it to my database and it all matched the official eartag numbers so off to scan the lambs and see if there are any issues.
Thanks again for all the halp. This place is a veritable wikipedia of knowledge. 🙂
When I say it doesn’t work. I can get the number to stay up with the zero at the start but I cannot then drag that number down to populate a list of 500 consecutive numbers
Classic creeping functionality in an IT project specification – ask for one thing then expand requirements .. then complain that it doesn’t work / contract price has gone up ![/quote]
😆 😆 😆 😆
Posted 8 years ago
Viewing 24 posts - 1 through 24 (of 24 total)
The topic ‘Simple (to an expert) Excel question’ is closed to new replies.