+ Reply to Thread
Results 1 to 4 of 4

Automatically wrap and merge text from a template used for a quote form

  1. #1
    Registered User
    Join Date
    05-11-2019
    Location
    Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    2

    Automatically wrap and merge text from a template used for a quote form

    I am using an excel sheet from a template as a form for supplying quotes. If the text description of the items quoted only take up one row, there is no issue. Most of the time the text description is 2-4 rows which must be manually wrapped and merged to fit the form. I need the rows to automatically wrap and merge when the line is longer than the allotted space for 1 row and not increase the length of the form. The same text needs to wrap and merge on another sheet used for a packing slip but the rows are longer than the quote sheet. More details are in the template. Any help would be appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Automatically wrap and merge text from a template used for a quote form

    The issue is that you have merged cells. Merged cells do not wrap properly. So here is a macro that does it for you. It computes the width of column B and sets column ZZ (assuming your are not going out that far) to that width. Then it copies the contents of the rows out there, wraps them, resizes the entire row and then clears the contents of ZZ. The end result is that you get a column tall enough to wrap the text even though it is in merged cells.

    Please Login or Register  to view this content.
    You can map this macro to CTRL-SHIFT-R or something like that.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    05-11-2019
    Location
    Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Automatically wrap and merge text from a template used for a quote form

    Thanks dflak, that's close to what I want. BTW this was the first macro I've added to Excel. I was able to execute the macro and it did resize the row to what I assume is the correct height but the text did not wrap, it still only shows one line of text even though the row has increased in height.
    Do we need to add something else to the macro?

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Automatically wrap and merge text from a template used for a quote form

    It worked for me, but apparently, I formatted column B to wrap text before running the macro. You can do that, or you can use the code in this macro. I added a line to invoke cell wrap on column B.
    Attached Files Attached Files

+ 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. Replies: 1
    Last Post: 02-05-2016, 05:49 PM
  2. [SOLVED] Insert New row to add more rows to merge range with wrap text
    By bdouglas1011 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-08-2014, 01:27 PM
  3. [SOLVED] How to get Merge cells with wrap text to carry over with HTML to outlook
    By bdouglas1011 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-04-2014, 09:35 PM
  4. How to copy/paste text from ws to ws with Merge/Wrap/Auto Fit
    By tuongtu3 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 03-04-2013, 12:44 AM
  5. [SOLVED] Wrap text, Merge cells
    By ufo_pilot in forum Excel General
    Replies: 2
    Last Post: 08-17-2005, 10:04 PM
  6. [SOLVED] Wrap and merge text will not show all lines
    By jar57 in forum Excel General
    Replies: 2
    Last Post: 07-20-2005, 01:05 AM
  7. [SOLVED] can wrap text and merge be used together?
    By Elizabeth in forum Excel General
    Replies: 4
    Last Post: 03-15-2005, 03:06 PM

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