+ Reply to Thread
Results 1 to 11 of 11

Moving information to next empty cell

  1. #1
    Registered User
    Join Date
    01-21-2022
    Location
    USA
    MS-Off Ver
    2016
    Posts
    8

    Exclamation Moving information to next empty cell

    Good day Excel Experts,

    I have some issues with a document that I have, in my document there is a list of 6 columns that could have infinite rows. lets say that every column has different information (it could be a date, a number, text, different imputs, but not formulas).
    And each row is a new item that registers the same data.

    What I would like to do is a code that copy the information of the 5 columns specific for row 1 and paste initially on an specific cell, "P" for example, and then when i run the macro again search for the next empty cell of that specific row and paste the information of the 5 columns. And then do the same on the next row of the source data.

    Lets say that have information on the range G6:L6, when i run the macro I want to paste the information of this range on cel P6, and then when I run the macro again it to paste it on the next empty cell of row 6, which will be V6 and then when I run it again to paste it on the next empty cell that will be AB6 and then infinite times, and after paste to do the same on the next row 7, 8, 9 and consecutively.

    Please clarify if I was clear enough.

    I have attached an example of the source data. Cause I dont have the data on the cell 1,1.

    Best regards,
    Attached Files Attached Files
    Last edited by Irving-La-Makina; 02-08-2022 at 04:51 PM.

  2. #2
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Moving information to next empty cell

    Do you want the code to ask which will be the first column to paste into? Since Column P is not the next empty cell, how would the code know where to start pasting.

  3. #3
    Registered User
    Join Date
    01-21-2022
    Location
    USA
    MS-Off Ver
    2016
    Posts
    8

    Re: Moving information to next empty cell

    it would be easier to just paste on the next empty cell rigth? It is ok to paste on the next empty cell as the first column.

    Thanks for your time

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Moving information to next empty cell

    Next empty column on row 5. You can adjust
    Range("G6:L6").Copy
    into

    Range("G6:L" & Range("G" & Rows.Count).End(xlUp).Row).Copy
    if you want to copy non empty rows

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,695

    Re: Moving information to next empty cell

    Select a cell in Column G only(G6 or G7 or G8 or whatever). Not the whole range (G6:L6)
    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Moving information to next empty cell

    Hopefully this will help

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-21-2022
    Location
    USA
    MS-Off Ver
    2016
    Posts
    8

    Re: Moving information to next empty cell

    Is it possible to start on the next empty cell instead of making an input of the column?

  8. #8
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Moving information to next empty cell

    here is an update

    Please Login or Register  to view this content.

  9. #9
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,695

    Re: Moving information to next empty cell

    Select a cell in Column G and run code as many times as you wish.
    Please Login or Register  to view this content.
    Or for values only
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    01-21-2022
    Location
    USA
    MS-Off Ver
    2016
    Posts
    8

    Re: Moving information to next empty cell

    Thanks all for the information and backup, this is what I was looking for.

    Best regards!

  11. #11
    Registered User
    Join Date
    01-21-2022
    Location
    USA
    MS-Off Ver
    2016
    Posts
    8

    Re: Moving information to next empty cell

    Thanks for this, this is exactly what I wanted, it is now working.

    Best regards,

+ 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] Moving the Data to the Left empty Cell -- Request for modification
    By buvanamali in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-22-2021, 03:15 AM
  2. Macro to check for empty cell and moving other cell's content
    By lzechariah in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2018, 04:34 PM
  3. Loop is overwriting instead of moving down to next empty cell
    By okieguy19 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-22-2014, 02:51 PM
  4. Moving information from within a cell
    By tazmania25 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-15-2013, 08:00 AM
  5. Moving headers and cell information
    By taichi56 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-25-2011, 05:38 PM
  6. Moving to first empty cell on page
    By steeley7 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 01-22-2009, 06:45 PM
  7. Replies: 2
    Last Post: 10-06-2005, 02:05 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