+ Reply to Thread
Results 1 to 6 of 6

Trouble copying 1st empty cell from one sheet to 1st empty cell in 2nd sheet.

  1. #1
    Registered User
    Join Date
    01-26-2014
    Location
    Ipswich, MA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Trouble copying 1st empty cell from one sheet to 1st empty cell in 2nd sheet.

    I am new to VBA macros and attached is the code that i have tried but get a runtime error 9: subscript out of range. Can anyone help. The first cell to copy is in 1st worksheet cell A5 (if has data) and it will also be copied to cell A5 (if empty) in 2nd worksheet. Below is my code:

    Please Login or Register  to view this content.
    Thanks for your help
    Last edited by Fotis1991; 05-27-2014 at 10:24 AM. Reason: pls use code tags around your codes

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Trouble copying 1st empty cell from one sheet to 1st empty cell in 2nd sheet.

    I can't determine what you're trying to do from your description and code. Could you better explain? The title says you want to copy an empty cell. I doubt you really want that.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    01-26-2014
    Location
    Ipswich, MA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Trouble copying 1st empty cell from one sheet to 1st empty cell in 2nd sheet.

    Sorry, that would be pretty silly, let me try and clarify. 1st spreadsheet "ICU" may have date in cells A5 to A29 (all cells are 3 rows combined i.e. a5,a6 and a7 are combined in A5). I want to copy the first cells with data to the first empty cell in column A in 2nd spreadsheet "CAPU summary" -beginning in A5 (these cells also have 3 rows combined). I then want to continue copying the next cell in column A spreadsheet "ICU" to the next empty cell in column A in spreadsheet "CAPU summary".

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Trouble copying 1st empty cell from one sheet to 1st empty cell in 2nd sheet.

    Try this...

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-26-2014
    Location
    Ipswich, MA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Trouble copying 1st empty cell from one sheet to 1st empty cell in 2nd sheet.

    When I run this macro, nothing happens. There is no copying from "ICU" to "CAPU Summary". I believe that I have copied the code correctly.

  6. #6
    Registered User
    Join Date
    01-26-2014
    Location
    Ipswich, MA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Trouble copying 1st empty cell from one sheet to 1st empty cell in 2nd sheet.

    Thank-you, I was able to utilize this code to solve my issue. many thanks

+ 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. If a cell is not empty paste it and another to another sheet....
    By dsmith7610 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-23-2014, 09:46 AM
  2. [SOLVED] Macro to copy cell value of Sheet1 to next empty cell of colum A in Sheet 2
    By JamesFinch in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-15-2014, 02:54 PM
  3. [SOLVED] Cooy from one sheet to another sheet until empty cell
    By RoMarius1981 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-21-2013, 08:08 AM
  4. 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
  5. copy cell value from one sheet to another if empty
    By perko121 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2010, 10:26 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