+ Reply to Thread
Results 1 to 5 of 5

How to move remaining cells in a column to a new column every time a text is seen

  1. #1
    Registered User
    Join Date
    07-21-2020
    Location
    Washington, DC
    MS-Off Ver
    365
    Posts
    20

    How to move remaining cells in a column to a new column every time a text is seen

    excellll.png I want to create a new column and bring the remaining cells to a new column everytime an ==== appears because it signifies a new day. I'd like to add this to an existing VBA code so that it can be done in one macro. How can I make column P and Q look like the table on the right?
    Last edited by planjb; 07-22-2020 at 10:34 PM.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: How to move remaining cells in a column to a new column every time a text is seen

    Try
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-21-2020
    Location
    Washington, DC
    MS-Off Ver
    365
    Posts
    20

    Re: How to move remaining cells in a column to a new column every time a text is seen

    This works perfectly! Thank you! However, I am encountering a new problem now. I would like to have one macro/vba code that repeats this function for 4 separate sheets. I tried inserting this code into my current VBA code four times to run this for each sheet but it is giving me a "compile error: duplicate declaration in current scope." I tried changing the x and i variable for each time I want to repeat this function but that didn't work. Is there any way I can make one macro that repeats this code in four different sheets?

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: How to move remaining cells in a column to a new column every time a text is seen

    Need to see your code.

  5. #5
    Registered User
    Join Date
    07-21-2020
    Location
    Washington, DC
    MS-Off Ver
    365
    Posts
    20

    Re: How to move remaining cells in a column to a new column every time a text is seen

    I was able to get it to repeat without error! Thank you for all your help!!

+ 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] Find certain Text in a column then move those cells back 1 column
    By Grahamfeeley in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-11-2017, 02:15 AM
  2. [SOLVED] Move column with remain format cells and number stored as text
    By Shermaine2010 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-15-2017, 09:44 AM
  3. Replies: 2
    Last Post: 06-23-2015, 08:29 AM
  4. Take rows of text and move to into a new column, each column easily identified
    By CATTX01 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2015, 03:35 PM
  5. [SOLVED] Move Data From One Column to Another based on column headers and Row Text
    By DerbysGal in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 02-10-2014, 07:21 AM
  6. Replies: 12
    Last Post: 01-08-2014, 11:28 AM
  7. Replies: 7
    Last Post: 08-15-2009, 09:09 AM

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