There is a code:
I need to perform this code on not empty cells only, but can't figured out how to put IsEmpty() in actual code.
Code:
Sub CopyToClipboard()
Dim str As String
For Each rangeRow In Selection.Rows
For Each rangeCol In rangeRow.Cells
str = str & rangeCol.Value & ","
Next
str = Left(str, Len(str) - 1) & vbCrLf
Next
With New DataObject
.SetText str
.PutInClipboard
End With
End Sub