+ Reply to Thread
Results 1 to 7 of 7

Macro to wrap text and adjust row height

  1. #1
    Registered User
    Join Date
    06-13-2012
    Location
    Connecticut
    MS-Off Ver
    Excel 2010
    Posts
    35

    Macro to wrap text and adjust row height

    I wrote a macro that wraps the text in Column E and then adjusts the row height for every cell in the worksheet. But when I ran it the text was not wrapped. I then decided that perhaps the wrapping was working in some toggling on/off fashion. So I modified the code to first set the wrapping to 'False' and then set is to 'True'. The result still does not show the text as wrapped though. Any help on what I'm doing wrong is appreciated. Thanks.


    Please Login or Register  to view this content.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to wrap text and adjust row height

    Try:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    06-13-2012
    Location
    Connecticut
    MS-Off Ver
    Excel 2010
    Posts
    35

    Re: Macro to wrap text and adjust row height

    Thanks for your reply xladept. I tried your code and it made no difference. The wrapping is indeed set to 'on' after running both your code and my code but the entries do not wrap.
    I can get the text to wrap by manually turning wrapping 'off' and then 'on' using the toolbar though.

    I should add that I'm trying to wrap a column in an Excel 'table' with data generated by a sql query. Not sure if that's a factor though. Thanks in advance for any further input. -John

  4. #4
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Re: Macro to wrap text and adjust row height

    Maybe you can upload an example file so we can test on our systems.

    Click go advanced and look for the manage attachments link below where you type.
    If you want something done right... find a forum and ask an online expert.

    Time flies like an arrow. Fruit flies like a banana.

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to wrap text and adjust row height

    Yes an example will let us know whether we can help - but you're welcome and thanks for the rep!

  6. #6
    Registered User
    Join Date
    06-13-2012
    Location
    Connecticut
    MS-Off Ver
    Excel 2010
    Posts
    35

    Re: Macro to wrap text and adjust row height

    I created an example file- but then the macro worked on it. So it may have something to do with the query that delivers the data. I can't really share the actual file so I think I will just have to keep pondering this on my own and experimenting.
    Thanks, John

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to wrap text and adjust row height

    Bummer! Have you tried it on a copy?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Adjust cell height with wrap text from one particular column
    By SAI2 in forum Excel General
    Replies: 2
    Last Post: 03-06-2018, 05:47 PM
  2. Need a macro that locks row height and wrap text in a pivot table
    By jaimeteele in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-29-2013, 10:53 AM
  3. Macro to adjust row height to show all text in merged cell
    By joe27 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-03-2011, 06:34 PM
  4. Text wrap and allow cell height to increase with wrap
    By tpenterprize in forum Excel General
    Replies: 1
    Last Post: 10-19-2007, 02:30 PM
  5. Text won't wrap if row height is over 200
    By cms2004 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-28-2005, 11:05 PM
  6. [SOLVED] Excel adjust row height upon merging 2 cell with word wrap
    By RT in forum Excel General
    Replies: 3
    Last Post: 07-16-2005, 03:05 PM
  7. [SOLVED] Text Wrap, Cell Height Does NOT Automatically Adjust
    By Al Franz in forum Excel General
    Replies: 1
    Last Post: 01-24-2005, 10:07 PM

Tags for this Thread

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