+ Reply to Thread
Results 1 to 3 of 3

paste only if destination cell nonblank

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-25-2006
    Posts
    215

    paste only if destination cell nonblank

    I'm using pastespecial to copy values from one range to another. I've tried setting the skipblanks to true to prevent original blank cells from overwriting data in destination cells, but I'd rather have it check to see if the destination cells have data first, and the complete the pastespecial command. Any ideas?

    Thanks.

    EP

  2. #2
    Tom Ogilvy
    Guest

    RE: paste only if destination cell nonblank

    if isempty(activeCell) then
    activecell.pastespecial xlValues
    end if

    --
    Regards,
    Tom Ogilvy



    "edwardpestian" wrote:

    >
    > I'm using pastespecial to copy values from one range to another. I've
    > tried setting the skipblanks to true to prevent original blank cells
    > from overwriting data in destination cells, but I'd rather have it
    > check to see if the destination cells have data first, and the complete
    > the pastespecial command. Any ideas?
    >
    > Thanks.
    >
    > EP
    >
    >
    > --
    > edwardpestian
    > ------------------------------------------------------------------------
    > edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809
    > View this thread: http://www.excelforum.com/showthread...hreadid=537330
    >
    >


  3. #3
    Forum Contributor
    Join Date
    04-25-2006
    Posts
    215

    Thanks Tom, I have on more question.

    Once I've implemented all that, I still need the data to be copied based on two criteria:

    Shift: which is a list box containing "Day" "Swing" & "Grave"
    And Date, which is a reference to the date in a specific cell.

    These two factors need to be found in a range of cells, and then the values pasted. Basically, I need to have and offset function to find the cells where the data needs to be pasted.

    Below is a formula that I'm using to find the info once it's pasted, so I need to somehow utilize this to paste the data.

    I hope this makes sence.

    =IF(Date=0,"",OFFSET($C$6:$C$109,,MATCH(Date,$D$3:$CV$3,0)))

    Thanks again..

+ 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