+ Reply to Thread
Results 1 to 8 of 8

text wrap to next row

  1. #1
    Forum Contributor
    Join Date
    04-25-2006
    Posts
    215

    text wrap to next row

    I have two rows on a protected worksheet. The rows are used to type text into. Once the user enters enough text in row one to fill the cell, I need the text to continue to row two. For example, once cell A1 is full, the text would automatically continue in cell A2

    I've searched everywhere for a macro that could accomplish this but have been unsuccessful.

    Any ideas?

    Thanks.

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Why not just merge A1 & A2 to act as a single cell
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Forum Contributor
    Join Date
    04-25-2006
    Posts
    215
    This row is actually a series of cells merged together - E23:N23, whereas the second row is D24:N24. I also need lines under each row to conform to a certain format.

    Is it possible to do something like a max character count. And when reached the curser would automatically move to the next row.

    If a word reached the max character count, the macro could count back to the last space (space between words) and then move that word to the next row and the user could continue typing.

    Hope this makes sence. Thanks.

  4. #4
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Hi, Edward. I don't think Excel can do exactly what you are describing, but see if this will work for you. Right-click on the sheet tab, select View Code, and paste this into the sheet module:
    Please Login or Register  to view this content.
    What this will do is after E23 is changed, any characters exceeding 100 will be moved down to the next cell (E24). If you want the character length to be more or less, change the red font above.

    HTH

    Jason

  5. #5
    Forum Contributor
    Join Date
    04-25-2006
    Posts
    215
    I think I'm making progress. On a workbook without any merged cells the script works fine. On this particular sheet; however, because of the way the cells are merged. Row one is E23; however row two is D24. Running the script returns an error and highlights:
    Please Login or Register  to view this content.
    Any ideas?

    Thanks.

  6. #6
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Try changing
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Jason

  7. #7
    Registered User
    Join Date
    05-29-2013
    Location
    westwood
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: text wrap to next row

    Good Afternoon!

    I am having this same problem, and tried your solution Jason! An error message popped up, and I figured it might be because the cell names are different. Cells D30-K30 are merged, and D30-D49 are formated the same way (thus D31-K31 are merged, D32-K32 ect)... I would like 89 letters to be entered on the merged D30 line and have it jump to D31 and go 89 more letters, then to D32 ect... I tried modifying the code you typed, and this is what I entered:

    Please Login or Register  to view this content.

    The part I put in red font above is what they said was wrong with it when I hit find. I asked for the definition when I right clicked on it and it said this portion wasn't recognized.

    I would REALLY appreciate your help. I'm making a purchase order in Excel, and we usually copy and paste parts of proposals into the PO. It looks weird without the line marks, I've tried merging them and wrapping the text. It would be stellar if I could copy and paste it, and it would put itself into the rows using a method like this.
    Last edited by arlu1201; 05-30-2013 at 01:36 AM.

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: text wrap to next row

    serinamarie,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.

    Also,

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. In order to put code tags, either type [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] at the end of it, OR you can highlight your code and click the # icon at the top of your post window.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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