Hi,
I look for VBA code that executes a Copy-paste while skipping any blanks, for large number of cells in an efficient manner (so not going through the range cell-by-cell).
I already gathered two copy paste methods that do not mess up the clipboard:
This VBA can Copy-past values of ranges while bypassing the clipboard:
Range("'[" & DestinationWb & "]Sheet1'!A1:B2").Value = Range("Source").Resize(2, 2).Value
This VBA can Copy-paste ranges while bypassing the clipboard:
Range("SourceCell").Offset(1, 0).Resize(10, 1).Copy Destination:=Range("DestinationCell").Offset(1, 0).Resize(10, 1)
I am not actually sure if the 2nd one completely bypasses the clipboard, but at least my experience is that it does not interfere with other applications using the clipboard at the same time; i.e. if you execute the VBA, and press control V again, nothing happens.
Highly appreciated if you have any inspiration on how to accomplish a 'skip blanks' Copy paste! (Ideally: copy paste skip blanks, values only)
If only it were possible to instruct an Office instance to make the entire clipboard 'local' to that instance
Thanks in advance,
Poniente
I look for VBA code that executes a Copy-paste while skipping any blanks, for large number of cells in an efficient manner (so not going through the range cell-by-cell).
I already gathered two copy paste methods that do not mess up the clipboard:
This VBA can Copy-past values of ranges while bypassing the clipboard:
Range("'[" & DestinationWb & "]Sheet1'!A1:B2").Value = Range("Source").Resize(2, 2).Value
This VBA can Copy-paste ranges while bypassing the clipboard:
Range("SourceCell").Offset(1, 0).Resize(10, 1).Copy Destination:=Range("DestinationCell").Offset(1, 0).Resize(10, 1)
I am not actually sure if the 2nd one completely bypasses the clipboard, but at least my experience is that it does not interfere with other applications using the clipboard at the same time; i.e. if you execute the VBA, and press control V again, nothing happens.
Highly appreciated if you have any inspiration on how to accomplish a 'skip blanks' Copy paste! (Ideally: copy paste skip blanks, values only)
If only it were possible to instruct an Office instance to make the entire clipboard 'local' to that instance
Thanks in advance,
Poniente