+ Reply to Thread
Results 1 to 9 of 9

Copy data from one cell to another if a blank condition is true

  1. #1
    Registered User
    Join Date
    04-22-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    24

    Copy data from one cell to another if a blank condition is true

    Hi,

    I need to copy the data form Cell "C" to Cell "D" only if Cell "D" is empty

    i have been using the following code but it will overwrite cell "D" regardless if data is present or not.


    Please Login or Register  to view this content.

    thanks in advance

    Steve
    Last edited by gadjit; 09-08-2009 at 09:44 AM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Copy data from one cell to another if a blank condition is true

    Please take a few minutes to read the forum rules, and then edit your post to add code tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    04-22-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Copy data from one cell to another if a blank condition is true

    sorry, i will remember that for the future.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Copy data from one cell to another if a blank condition is true

    Thanks.

    Here's one way:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-22-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Copy data from one cell to another if a blank condition is true

    can i execute the code within the code below or do i have to run a separate macro?

    Please Login or Register  to view this content.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Copy data from one cell to another if a blank condition is true

    You can execute it in that code, but I don't know when you want to run it.

  7. #7
    Registered User
    Join Date
    04-22-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Copy data from one cell to another if a blank condition is true

    I have found where to place the code thanks,

    but as the macro is run from sheet 1 (Log) via a button i need the following code to copy cells "C" to "D" that are both located in sheet 2 (Data) is this possible?

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    04-22-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Copy data from one cell to another if a blank condition is true

    Do i need to submit a need thread for this?

  9. #9
    Registered User
    Join Date
    04-22-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    24

    [SOLVED] Copy data from one cell to another if a blank condition is true

    thanks for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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