Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=537330

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default paste only if destination cell nonblank


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..


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=537330

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paste contents, but keep formula of destination cynteeuh Excel Discussion (Misc queries) 2 November 19th 09 10:38 PM
Paste data to cell and keep destination font and size billbob New Users to Excel 2 July 10th 09 06:39 PM
Loop Statement through If Not IsEmpty Then Paste into Destination Dandelo Excel Discussion (Misc queries) 7 July 15th 08 10:29 PM
Require a cell to be nonblank if another cell is nonblank Herb Wexler Excel Discussion (Misc queries) 1 February 1st 06 08:05 PM
copy paste values only using destination:= Spike Excel Programming 3 January 12th 06 11:27 PM


All times are GMT +1. The time now is 04:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"