Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
ASU ASU is offline
external usenet poster
 
Posts: 63
Default copy and paste using vb code

Please help me!!!
How do I paste, using vb code, a cells formula to the next empty cell in the
same column?
Thank you.
--
ASU
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default copy and paste using vb code

Dim myCell as range
dim DestCell as range

set mycell = range("somecellthatyouwanttocopy")

with worksheets("sheet9999")
set destcell = .cells(.rows.count,"A").end(xlup).offset(1,0)
end with

mycell.copy
destcell.pastespecial paste:=xlpasteformulas

=====
Something like this actually pastes to the cell under the last used cell in the
column.



ASU wrote:

Please help me!!!
How do I paste, using vb code, a cells formula to the next empty cell in the
same column?
Thank you.
--
ASU


--

Dave Peterson
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
copy and paste formula using vb code ASU Excel Discussion (Misc queries) 4 September 7th 06 08:56 PM
Macro to open workbook and copy and paste values in to orig workbo Dena X Excel Worksheet Functions 1 December 16th 05 12:13 AM
CheckBox Code to copy & paste range Casey Excel Discussion (Misc queries) 0 October 13th 05 05:32 PM
copy and paste code problem bigdaddy3 Excel Worksheet Functions 10 September 21st 05 05:55 PM
copy and paste using code from workbook to workbook bigdaddy3 Excel Discussion (Misc queries) 2 September 14th 05 11:06 AM


All times are GMT +1. The time now is 02:26 PM.

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"