Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Help creating a formula that repeats text & increments an integer

I been trying to create a formula that repeats the same text characters in
each consecutive cell in a column but increments the integer by one (see
example below):
A1 = AB-0
A2 = AB-1
A3 = AB-2...

I believe I can take care of the text by using the function =LEFT(A1,3) but
I haven't been able to figure out how to add the formula to increment the
integer. I tried to just add "+1" at the end of the formula, but got the
#VALUE! error. I tried searching past posts and the Excel help menu, but
didn't see any entries that addressed this question.

Thx in advance for any help
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default Help creating a formula that repeats text & increments an integer

Try something like this:
=left(a1,3)&text(right(a1,1)+1,"0")

Regards,
Fred

"djow" wrote in message
...
I been trying to create a formula that repeats the same text characters in
each consecutive cell in a column but increments the integer by one (see
example below):
A1 = AB-0
A2 = AB-1
A3 = AB-2...

I believe I can take care of the text by using the function =LEFT(A1,3)
but
I haven't been able to figure out how to add the formula to increment the
integer. I tried to just add "+1" at the end of the formula, but got the
#VALUE! error. I tried searching past posts and the Excel help menu, but
didn't see any entries that addressed this question.

Thx in advance for any help


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Help creating a formula that repeats text & increments an integer

Here's one way (placed in A2, with A1 containing AB-0 as shown):

=LEFT(A1,3)&ROW(A1)

Copy down as required. If you want leading zeros for the number, so
the entries are all the same length, then you could use:

=LEFT(A1,3)&TEXT(ROW(A1),"000")

which will give you AB-001, AB-002, AB-003 etc.

Hope this helps.

Pete

On Jul 29, 11:36*pm, djow wrote:
I been trying to create a formula that repeats the same text characters in
each consecutive cell in a column but increments the integer by one (see
example below):
A1 = AB-0
A2 = AB-1
A3 = AB-2...

I believe I can take care of the text by using the function =LEFT(A1,3) but
I haven't been able to figure out how to add the formula to increment the
integer. *I tried to just add "+1" at the end of the formula, but got the
#VALUE! error. I tried searching past posts and the Excel help menu, but
didn't see any entries that addressed this question.

Thx in advance for any help


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,346
Default Help creating a formula that repeats text & increments an integer

Of course you can increment this by just dragging the fill handle down, no
formula necessary.

If you want a formula enter

="AB-"&ROW()

in A1 and copy it down.

The formula =LEFT(A1,3)&TEXT(RIGHT(A1,1)+1,"0")
will not work after 9.


--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"djow" wrote:

I been trying to create a formula that repeats the same text characters in
each consecutive cell in a column but increments the integer by one (see
example below):
A1 = AB-0
A2 = AB-1
A3 = AB-2...

I believe I can take care of the text by using the function =LEFT(A1,3) but
I haven't been able to figure out how to add the formula to increment the
integer. I tried to just add "+1" at the end of the formula, but got the
#VALUE! error. I tried searching past posts and the Excel help menu, but
didn't see any entries that addressed this question.

Thx in advance for any help

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy and paste VBA repeats and repeats Marilyn Excel Discussion (Misc queries) 4 June 7th 09 03:49 PM
Filling down text in increments of three Josh W Excel Worksheet Functions 7 March 11th 09 04:21 PM
Convert Text to Integer jerredjohnson Excel Discussion (Misc queries) 4 June 14th 06 07:45 PM
Extracting an integer from text craig-o Excel Discussion (Misc queries) 1 November 9th 05 08:57 PM
excel/some text auto repeats in same columb others don't why. P.G.C. Excel Worksheet Functions 1 October 20th 05 06:17 PM


All times are GMT +1. The time now is 02:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"