Thread: Pasting problem
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
BrianB BrianB is offline
external usenet poster
 
Posts: 1
Default Pasting problem

Here is partial code that should help :-

Code:
--------------------

Dim ToRow As Long
Dim ToCol As Integer
Dim FoundCell As Object
Dim FromRange As Range
Dim ToRange As Range
'-------------------------------
Set FromRange = ActiveSheet.Range("C12:G12")
'- do find
'set Foundcell = ... etc. (no need to Activate or Select)
'
' transfer found values
ToRow = FoundCell.Row
ToCol = FoundCell.Column
Set ToRange = Worksheets("sheet2") _
.Range(Cells(ToRow, ToCol + 4), Cells(ToRow, ToCol + 8))
ToRange.Value = FromRange.Value

--------------------



---
Message posted from http://www.ExcelForum.com/