+ Reply to Thread
Results 1 to 7 of 7

Thread: Need some help with "ascending" text filling multiple cells

  1. #1
    Registered User
    Join Date
    03-08-2011
    Location
    Illinois
    MS-Off Ver
    Excel 2007
    Posts
    9

    Need some help with "ascending" text filling multiple cells

    Hello, I'm new to these boards. I have a fairly lengthy project that involves something I am unfamiliar with in Excel.

    http://i.imgur.com/1Wylp.png

    Basically, every time I see "testtrial" I have to increase the t### value by one. But I also need to keep the value the same within each testtrial. Is there an easier way to do this besides typing every one out?
    Last edited by tekeetakshak; 03-09-2011 at 01:11 AM.

  2. #2
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,224

    Re: Need some help with "ascending" text filling multiple cells

    Based on the picture, are you saying the cell E1 would change to testtrial1 and cell E6 becomes testtrial2 and cell E11 becomes testtrial3?
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-08-2011
    Location
    Illinois
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Need some help with "ascending" text filling multiple cells

    Sorry for being vague. I'll clarify:

    The second column involves the values that I am inputing. I already filled in everything in second column manually, but I would prefer to have a shortcut to do it. (Basically, the only column that I'm dealing with is column 2. Everything else was already typed in the spreadsheet when I received the document.)

    Every time I see a new testtrial I have to increase my t### by one. So I'll have, for example: t300, t300, t300 and then I'll see a new test trial three columns to the right. Then I go to t301, t301, and so on until there's a new testtrial.

    The testtrial's won't be changing, but the t### will.
    Last edited by tekeetakshak; 03-09-2011 at 12:45 AM.

  4. #4
    Forum Guru ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    traded up
    MS-Off Ver
    2003 & 2010
    Posts
    1,905

    Re: Need some help with "ascending" text filling multiple cells

    You could use a formula like:

    =COUNTIF(D$1:D1,"testtrial")
    autofilled down, and format the cell as:

    "t"000
    If you want the first cell to start at a number higher than one, then just add a constant, e.g.:

    =COUNTIF(D$1:D1,"testtrial")+42
    Cheers,
    “To sin by silence when they should protest makes cowards of men.” ~ Abraham Lincoln

  5. #5
    Registered User
    Join Date
    03-08-2011
    Location
    Illinois
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Need some help with "ascending" text filling multiple cells

    Thanks for the help! However, being slightly new to Excel, I'm having difficulty "formatting" the cell with the code you provided. How would I go about formatting a cell as "t"000?

  6. #6
    Forum Guru ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    traded up
    MS-Off Ver
    2003 & 2010
    Posts
    1,905

    Re: Need some help with "ascending" text filling multiple cells

    Right-Click on the cell and select Format Cells. Then, on the number tab, select Custom, and add the "t"000 in the Type: box.

    Cheers,
    “To sin by silence when they should protest makes cowards of men.” ~ Abraham Lincoln

  7. #7
    Registered User
    Join Date
    03-08-2011
    Location
    Illinois
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Need some help with "ascending" text filling multiple cells

    Yes, I tried that, but it doesn't seem to be inputting a letter t in the box (your testtrial code does work, however).

    EDIT: nevermind, I'm being dumb. Thanks for the help!
    Last edited by tekeetakshak; 03-09-2011 at 01:11 AM.

+ 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.2.0