Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
AK AK is offline
external usenet poster
 
Posts: 56
Default How to copy and paste in VB

If worksheet :
A B C
1 20051208 =LEFT(A1,6) 10000
2 20051209 5000
3 20051222 24200

I want to copy the formula from cells(B1) down to the last used cells(which
is unknown) , how to implement in VB. I try to use OFFSET but doesn't work.

Thanks for your help in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 180
Default How to copy and paste in VB

Range("B1").Select
Selection.Copy
Application.Goto Reference:="R65536C1"
Selection.End(xlUp).Select
Selection.Offset(0, 1).Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("B1").Select


"ak" wrote:

If worksheet :
A B C
1 20051208 =LEFT(A1,6) 10000
2 20051209 5000
3 20051222 24200

I want to copy the formula from cells(B1) down to the last used cells(which
is unknown) , how to implement in VB. I try to use OFFSET but doesn't work.

Thanks for your help in advance

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default How to copy and paste in VB

try:

With Sheet1
.Range("b1").AutoFill
..Range("b1").Resize(rowsize:=.Range("a1").Current Region.Rows.Count),
xlFillCopy
End With

-voodooJoe

"bpeltzer" wrote in message
...
Range("B1").Select
Selection.Copy
Application.Goto Reference:="R65536C1"
Selection.End(xlUp).Select
Selection.Offset(0, 1).Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("B1").Select


"ak" wrote:

If worksheet :
A B C
1 20051208 =LEFT(A1,6) 10000
2 20051209 5000
3 20051222 24200

I want to copy the formula from cells(B1) down to the last used
cells(which
is unknown) , how to implement in VB. I try to use OFFSET but doesn't
work.

Thanks for your help in advance



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
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM
I cannot paste from one workbook to another. Copy works, paste do. JimmyMc Excel Discussion (Misc queries) 1 June 10th 05 03:54 PM
Copy and Paste macro needs to paste to a changing cell reference loulou Excel Programming 0 February 24th 05 10:29 AM
Macro to Copy/Paste then Paste to Next Line tomkarakowski Excel Programming 1 May 28th 04 01:19 AM


All times are GMT +1. The time now is 05: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"