ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   copy paste codes (https://www.excelbanter.com/excel-programming/364731-copy-paste-codes.html)

Taru[_12_]

copy paste codes
 

Could someone tell me some commands that will essentially copy and
paste?
Does cell.offset copy and paste? The help files says that it "returns",
but its only for a specific cell or range. I just need some different
commands for copy and paste


--
Taru
------------------------------------------------------------------------
Taru's Profile: http://www.excelforum.com/member.php...o&userid=35494
View this thread: http://www.excelforum.com/showthread...hreadid=553332


Ardus Petus

copy paste codes
 
Maybe you need someting like:
Range("A1").Copy destination:=Range("B1")

That will copy contents and format of A1 into B1

HTH
--
AP

"Taru" a écrit dans le
message de news: ...

Could someone tell me some commands that will essentially copy and
paste?
Does cell.offset copy and paste? The help files says that it "returns",
but its only for a specific cell or range. I just need some different
commands for copy and paste


--
Taru
------------------------------------------------------------------------
Taru's Profile:
http://www.excelforum.com/member.php...o&userid=35494
View this thread: http://www.excelforum.com/showthread...hreadid=553332




Taru[_14_]

copy paste codes
 

Well What I want to do is to find anything beginning with TC and cut
and paste it one cell to the left of where its found. Right now I've
done this so far.

Sub SortCells()
Dim rng As Range
x = ("TC*")
With Worksheets("VVGI.GO")
Set rng = .Range("B1:B24518").Find(x.Value)
If Not rng Is Nothing Then
rng.Offset(0, -1).Value = .Cells(rng.Row, 1)
End If
End With
End Sub

Unfortunately there is a problem with the Set rng and alos with the
offset

Somebody want to look at this, give me some tips?


--
Taru
------------------------------------------------------------------------
Taru's Profile: http://www.excelforum.com/member.php...o&userid=35494
View this thread: http://www.excelforum.com/showthread...hreadid=553332



All times are GMT +1. The time now is 02:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com