Results 1 to 6 of 6

macro to wrap/unwrap text for a given range

Threaded View

  1. #1
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    459

    macro to wrap/unwrap text for a given range

    This is my current code to unwrap text for a given range

    Sub WrapTEXT()
    
        Rows("2:500").Select
        Cells.WrapTEXT = False
        Range("A2").Select
        
    End Sub
    I would like to build in a IF function to say if the given range is unwrapped (Cells.WrapTEXT = False) THEN wrap the range (Cells.WrapTEXT = True)
    i.e. everytime the macro button is clicked it will wrap and unwrap the data range
    Last edited by Gti182; 03-26-2014 at 09:21 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Wrap Text in ListView: how to wrap text in the columns of a list view
    By TommyToe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2012, 07:02 AM
  2. VBA to unwrap text in all cells
    By dagindi in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-05-2010, 02:07 AM
  3. 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
  4. shortcut toolbar to wrao/unwrap text
    By ceemo in forum Excel General
    Replies: 1
    Last Post: 11-15-2006, 04:20 PM
  5. [SOLVED] How do I unwrap text to columns?
    By ChristineR in forum Excel General
    Replies: 2
    Last Post: 12-09-2005, 11:50 AM

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