View Single Post
  #1   Report Post  
BizMark BizMark is offline
Member
 
Location: London
Posts: 78
Default

You're quite right!
It works IF the source selection is a single cell, and not if the source selection is multiple cell.

You could try the following though, assigning them to a couple of shortcut keys:

'###CODE BEGINS HERE
Public xSel As Range

Sub CopyCustom()
Set xSel = Selection.Cells
End Sub

Sub PasteCustom()
nCell = 0

For Each xCell In Selection.Cells
If Not (xCell.EntireRow.Hidden Or xCell.EntireColumn.Hidden) Then
nCell = nCell + 1
xCell.Value = xSel.Cells(nCell).Value
End If

If nCell = xSel.Cells.Count Then
nCell = 0
End If
Next xCell
End Sub
'###CODE ENDS HERE