Hi All,
I'm using VBA to copy and paste user selected cells from one workbook to another. The target workbook is filtered and I'm only pasting to the visible rows. The problem I'm having is I don't know how to make it so I'm only pasting the values. I don't want formulas, formats, etc. to be copied over to the target cells. It would be very much appreciated if you could add the fix to my existing code. I hope someone can help.
Sub PasteToVisibleRows2()
Dim rFrom As Range, rTo As Range
Dim i As Long, Ofset As Long
Dim RngCopySelection As Range
Set RngCopySelection = Application.InputBox("Please select copy area", "Area Selection", , , , , , 8)
Dim RngPasteSelection As Range
Set RngPasteSelection = Application.InputBox("Please select paste area", "Area Selection", , , , , , 8)
Set rFrom = RngCopySelection
Set rTo = RngPasteSelection
For i = 1 To rFrom.Rows.Count
Do Until Not rTo.Offset(Ofset).Rows.Hidden
Ofset = Ofset + 1
Loop
rFrom.Rows(i).Copy Destination:=rTo.Offset(Ofset)
Ofset = Ofset + 1
Next i
Bookmarks