Paste clipboard in cell same range as source

Viewed 24

I have two workbooks with the same data structure. One is a spreadsheet used to store data, and the other is a data capture spreadsheet. The latter is sent out and filled in, and then I need to copy over the data to the storage sheet.

In both sheets, there are protected cells that contain categorical formulas, which I want to ignore.

This is the data structure:

ID NAME DP1 DP2 PROTECT1 DP3 DP4 PROTECT2
1 One A 10 YELLOW G 5 RED
2 Two B 20 GREEN F 10 ORANGE
3 Three C 30 BLUE E 15 PINK

I handle the copy from one sheet using:

  Sub HighlightCell()
  Dim rng As Range
  With ActiveSheet
      Set rng = Union(Range("A3:B100"),.Range("C3:D100"),.Range("F3:G100"))
  End With
  rng.Select
  End Sub

When I paste, I want the clipboard to fill the same ranges as source.

Is this possible with VBA?

0 Answers
Related