I have been using excel for ever and I love to make tables. I know how to make a formula for a sequence of numbers, but I was wondering how I could make a formula for a sequence of numbers and letters. I want to make a table like this:
Serial# Product Stock Value Price
XXX000 Apples 15 $1 $2
XXX001 Bananas 15 $1 $3
etc.
XXY000 Pork 15 $1 $2
XXY001 Beef 15 $1 $1.50
etc.
I am trying to format the first column. The serial would have three letters and three numbers. I would start the "chain" by entering the first three random letters followed by 000 and then a formula to increment the numbers from there. And I could recycle the formula for my next set of three letters (if I could get a "-" between the letters and numbers that would be perfect ie XXX-000, but it would just be cosmetic so not necessary). I know there must be away to do this short of entering the serials manually.
Thank you for the help
edit: Thanks so much!
Last edited by janschepens; 08-28-2011 at 09:38 AM.
="xxx-"&TEXT(ROW(A1)-1,"000")
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
PHP Code:=Left(A4,3)&TExT(Right(A4,3)+1,"000")
Thank you so much! It worked you saved me some work![]()
Can't you just enter the first value say XXY-000 then use the fill handle, (the small black square bottom right of the selected cell), to drag it down?
If you need any more information, please feel free to ask.
However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
Also
If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.
yes you can lol
how about
="AA"&CHAR(65+FLOOR((ROW(A1)-1)/1000,1))&TEXT((ROW(A1)-1)-(1000*FLOOR((ROW(A1)-1)/1000,1)),"000")
that will give from aaa000 down to aaz999
26000 unique coded ref
Last edited by martindwilson; 08-28-2011 at 10:18 AM.
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks