+ Reply to Thread
Results 1 to 4 of 4

VBA code to find the end of data and move down a row

  1. #1
    Registered User
    Join Date
    09-17-2014
    Location
    Cambridge, England
    MS-Off Ver
    2016
    Posts
    58

    VBA code to find the end of data and move down a row

    Hello,

    I have two different worksheets within a document that all contain the same data but from two different sources. Each worksheet can be variable as to how many rows, but the columns will always remain the same.

    Basically I want to compile them together on sheet number 3.

    I have no issues with using VBA code to find the variable range on each cell using the below code as a quick example....
    Please Login or Register  to view this content.
    using the code above I capture the correct amount of data no matter how many rows the data has. And the same code is going to be used on both Sheet 1 and Sheet 2 to capture the data.

    I can then paste the data from Sheet 1 into Sheet 3 nice and easily, but then my VBA knowledge runs out.

    I need help from here on as I have the data from Sheet 2 (copied fine using the above code) but I do not know the VBA code to paste the values onto Sheet 3 into the next available row given that I have already pasted the data from Sheet 1 (and of course the data from Sheet 1 will vary in row length each day).

    Any help would be great.

    No doubt I really need to use VBA to designate a variable to find and store the cell that is next free before I paste the data from Sheet 2, but my knowledge on how to do this is non-existent.

    Thanks for your help in anticipation.

    I have pasted a basic Workbook to show what I am after. Sheet 1 contains a very small amount of data, Sheet 2 contains a bit more, and I need both to be copied one after the other onto Sheet 3.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: VBA code to find the end of data and move down a row

    Try this

    Please Login or Register  to view this content.
    Last edited by kvsrinivasamurthy; 09-05-2017 at 12:08 PM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  3. #3
    Registered User
    Join Date
    09-17-2014
    Location
    Cambridge, England
    MS-Off Ver
    2016
    Posts
    58

    Re: VBA code to find the end of data and move down a row

    kvsrinivasamurthy

    Your line of code worked fine. Thanks for your help.

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: VBA code to find the end of data and move down a row

    Thank you very much.

+ 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. Find Post code within row and move to specific cell within same row.
    By s86design in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-05-2016, 04:05 AM
  2. Code to Find and Copy occurrence of variable then move on to the next
    By Tonan230 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-14-2016, 04:25 AM
  3. Macro to find/compare data and move data from one sheet to the other
    By cory0789 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-11-2015, 01:31 PM
  4. Find Top 10 in data and move over to new tab
    By Thanks4helping in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-29-2015, 07:34 PM
  5. Macro to move code to cell, print, then move down the list to the next code
    By MilesDeep in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-09-2014, 04:59 PM
  6. I need help. Huge data source, I need to clean it up. Find and move data macro.
    By sangreal2007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2012, 02:26 PM
  7. find and move data within a column
    By Craig in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-24-2006, 02:20 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