Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't Copy and Paste or Paste Special between Excel Workbooks | Excel Discussion (Misc queries) | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) | |||
I cannot paste from one workbook to another. Copy works, paste do. | Excel Discussion (Misc queries) | |||
Copy and Paste macro needs to paste to a changing cell reference | Excel Programming | |||
Macro to Copy/Paste then Paste to Next Line | Excel Programming |