+ Reply to Thread
Results 1 to 4 of 4

Need help with macro stopping at empty cell when copy and pasting data from another worksh

  1. #1
    Registered User
    Join Date
    06-17-2014
    Location
    usa
    MS-Off Ver
    ms office 10
    Posts
    2

    Need help with macro stopping at empty cell when copy and pasting data from another worksh

    I Have a workbook that has 4 worksheets. My first sheet has all of my information needed which is pasted from different companies so the data is never the same amount. First I want to copy and paste lets say: Column B & Columns d-i from sheet1 to columns d-j on sheet2. the columns are always the same but the row amounts change. how can I have my macro copy the data and stop when the cell or range is empty?

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Need help with macro stopping at empty cell when copy and pasting data from another wo

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-17-2014
    Location
    usa
    MS-Off Ver
    ms office 10
    Posts
    2

    Re: Need help with macro stopping at empty cell when copy and pasting data from another wo

    I am new to vb so I hope you don't mind if I ask a few questions. I would use this macro exactly as you have it? and replace "Sheet1,2,3" with my sheet names? what does (3) (2) mean?

    thanks sooo much.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Need help with macro stopping at empty cell when copy and pasting data from another wo

    The (3) is a shorter version of (xlUp). It will select the last row with data in a Column. The (2) is an offset command it offsets (1) row. When used together (3)(2) it will select the first empty cell after the last cell with data in a Column.

+ 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. copy and and pasting to first empty cell in different workbooks
    By lwayl in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-11-2014, 04:38 PM
  2. Using a macro to copying data from 1 sheet, and pasting into next empty cell
    By Varial in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-13-2012, 04:05 PM
  3. Stopping a macro on empty cells
    By dymention2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-16-2012, 08:11 AM
  4. Replies: 1
    Last Post: 03-02-2010, 01:23 PM
  5. [SOLVED] Pasting data top 1st empty cell in range
    By wfcmark in forum Excel General
    Replies: 4
    Last Post: 12-08-2005, 08:35 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