+ Reply to Thread
Results 1 to 2 of 2

Insert a blank line when text changes in a column

  1. #1
    Registered User
    Join Date
    12-04-2019
    Location
    London
    MS-Off Ver
    2016
    Posts
    3

    Insert a blank line when text changes in a column

    Hello

    I have a spreadsheet and I would like to know if someone can help me with some visual basic code which would do the following?

    COLUMN A
    Friday
    Friday
    Friday
    Friday
    Monday
    Monday
    Tuesday
    Wednesday
    Wednesday
    Wednesday

    to this:-


    COLUMN A
    Friday
    Friday
    Friday
    Friday

    Monday
    Monday

    Tuesday

    Wednesday
    Wednesday
    Wednesday


    Many thanks!

  2. #2
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,482

    Re: Insert a blank line when text changes in a column

    Try this code, that should work.
    Please Login or Register  to view this content.
    the "trick" is to start inserting from the last row up to avoid the loop comparing new inserted (blank) lines to values it will migth endup in an endless loop..

+ 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. Macro to insert line or remove line depending on cell in column A.
    By cscott109 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-15-2018, 05:02 PM
  2. Replies: 0
    Last Post: 12-14-2018, 08:20 AM
  3. [SOLVED] Insert column Text after first non blank character
    By rexrundajets in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-16-2018, 10:30 AM
  4. [SOLVED] Insert blank row after each cell that contains text in column A
    By anrichards22 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-14-2013, 03:10 AM
  5. [SOLVED] insert a blank in every second line of a row
    By EliseT in forum Excel General
    Replies: 8
    Last Post: 12-02-2008, 07:17 AM
  6. [SOLVED] Insert Blank Line
    By Sherry in forum Excel General
    Replies: 8
    Last Post: 01-31-2006, 11:40 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