+ Reply to Thread
Results 1 to 8 of 8

Auto increment by 1 within text

  1. #1
    Registered User
    Join Date
    10-17-2007
    Posts
    7

    Auto increment by 1 within text

    Um, I figure this is probably simple but I'm new to this.

    I've got this pasted in cell A1
    blah blah=1 blah blah blah

    I want to copy the whole lot 1000 times but with the =1 changing to =2, =3

    So I end up with
    blah blah=1 blah blah blah
    blah blah=2 blah blah blah
    blah blah=3 blah blah blah

    Etc.

    How?

  2. #2
    Forum Contributor
    Join Date
    07-05-2007
    Location
    Lexington, MA
    Posts
    302
    Maybe the function =Row() is of use here. It becomes the row number where it is used, and of course you can use it in formulas. You can then copy and paste, or fill down, to fill in all of your rows.
    FrankBoston is the pen name for Andrew Garland, Lexington MA

  3. #3
    Registered User
    Join Date
    10-17-2007
    Posts
    7
    Thanks for the reply, but I'm going to need to be walked through this.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Say you want cell C1 to show "1apple" then C2 needs to be "2apple" etc. Put this formula in C1 and copy down as far as you need

    =ROWS(C$1:C1)&"apple"

  5. #5
    Registered User
    Join Date
    10-17-2007
    Posts
    7
    Tried that, didn't get anywhere.

    OK, here is the actual contents of A1
    TAG POS=1 TYPE=A ATTR=TXT


    I want an exact copy but with a number increment for each line.

    e.g.

    TAG POS=1 TYPE=A ATTR=TXT
    TAG POS=2 TYPE=A ATTR=TXT
    TAG POS=3 TYPE=A ATTR=TXT

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Try putting this formula in A1 and copying down

    ="TAG POS="&ROWS(A$1:A1)&" TYPE=A ATTR=TXT"

  7. #7
    Registered User
    Join Date
    10-17-2007
    Posts
    7
    Genius! that's done it!

    You've saved me a lot of time and hassle.

    Thank you very much.

  8. #8
    Registered User
    Join Date
    10-05-2011
    Location
    Bialystok
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Auto increment by 1 within text

    This topic is very old. Though, for all those who search for the simplest solution:

    type in the first cell
    blah blah=1 blah blah blah

    Then in the cell below the first sell type
    blah blah=2 blah blah blah

    Then mark two cells with your mouse. A square will show up at the right bottom of the second cell. Drag that sqyare and pull it down. Excel will auto increment the numer for you.
    cheers.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1