Create a sequence when the first cell has text and numbers

C

cfmartin76

This might be a silly question, but I haven't been able to find the
answer. I have one cell that will always have the the following
format: ABCD1111111111111111 (4 letters and 16 numbers). That will be
my first cell, I want to be able to create that number plus 1 on the
cell below, and repeat (scroll down) as many rows as there is
information on the left column. I t can be either using a formula or a
macro:

A B
1 Apples ABCD0000000000000005
2 Oranges ABCD0000000000000006
3 Pears ABCD0000000000000007
4 Coconut ABCD0000000000000008

I tried Autofill but it doesn't work, and neither does =previous column
+1.

Help!

Thanks!
 
D

Dave Peterson

I put this in B1
="ABCD"&TEXT(ROW(A5),REPT("0",14))
and dragged down.

When I was done, I selected that column
edit|copy
edit|paste special|values
to change the formulas to values.
 
E

el.cuervo76

WOW Dave, it works great!

Now a quick question, what if the number I want to start with is not
0000000000000001 but something like 0000010000000001?

Thanks!
 
C

cfmartin76

wow dave, this is great. Now, what if the first number is not
0000000000000001 but 0000100000000001 or something else? can I start
the list with any random number?
 
D

Dave Peterson

="ABCD"&TEXT(100000000+ROW(A1),REPT("0",14))

change that big number to your starting point.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top