New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

Continuing Numbers with Text

Formulas, Functions, Formatting, Charts, Data Analysis, etc.

Continuing Numbers with Text

Postby g4eights » Fri Dec 30, 2011 12:37 am

Hi Gurus,

I am having some problem trying to continue the numbes instead of typing one by one, I am trying to do this,
ISRC-MY-AC1-12-00636
ISRC-MY-AC1-12-00637
ISRC-MY-AC1-12-00638
ISRC-MY-AC1-12-00639
ISRC-MY-AC1-12-00640

a formula which I can copy and paste would be very helpful to copy and paste once the numbers has ran out.

Thank you.

Cheers,
Eights
  • 0

g4eights
Rookie
 
Posts: 1
Joined: Dec 30, 2011
Reputation: 0

Re: Continuing Numbers with Text

Postby Sisyphus » Fri Dec 30, 2011 3:07 am

Hi,

The easiest way of doing this is to format the cell in which you want the number:
Right-click / Format cells and select the Numbers tab.
Click on "Custom" (last item in the list) after making sure the current format isn't Text.
Enter this format mask
Code: Select all
"ISRC-MY-AC1-12-"0000

Click OK

The mask holds 2 instructions. Firstly, it will show any number you enter with at least 5 digits, filling missing digits with leading zeros. If you enter 1 it will appear as 00001. The other instruction is to precede the number by the text between the quotation marks. So, you enter 1 and you get ISRC-MY-AC1-12-00001. Be careful not to enter a blank space between the text and the zeros because it will be included in the output.

If you need to convert the format to real text, repeated in each cell, later you may try Copy / Paste Special. I somehow doubt that it will do what you want, however, because the cell never holds more than the number you enter. In fact, you can automate sequential numbering by counting, like =A10 + 1. written in A11 the cell would show 11 (or ISRC-MY-AC1-12-00011), and you can copy the formula to subsequent rows. So, you never need to write any number at all.

If you do need to convert back and Copy/Paste Special won't do, use this formula. You can use it on any cell holding a number, even if it is formatted as described above in which case the output will look the same as the input but isn't.
Code: Select all
= CONCATENATE("ISRC-MY-AC1-12-",TEXT(A10, "0000"))


The result can definitely be converted to real text using Copy / Paste Special and Values.
What are you going to do with all the time you are about to save?
How about welcoming the New Year with a smile? :D
Happy New Year!
  • 0

Have a great day! :D

Sisyphus
I do this for "honour and country" - much less of the latter, actually.
If I helped you, award points, plenty of them.
If I bored you, deduct points for being too long-winded. (I know, :lol)
Sisyphus
Former Moderator
 
Posts: 4454
Joined: Dec 7, 2011
Location: Shanghai
Reputation: 203
Excel Version: 2010


Return to General Excel Questions

Who is online

Users browsing this forum: No registered users and 244 guests