I have this handy macro that sums selected cells and puts the total into the clipboard using a shortcut key.:
Sub SelectionSumCopy()
Dim MyData As DataObject
Set MyData = New DataObject
MyData.SetText Application.WorksheetFunction.Sum(Selection)
MyData.PutInClipboard
End Sub
I can then paste the total wherever I need it.
The problem relates to a second macro I frequently use that uses the TextToColumns method with the decimal point as a separator. After using the second macro, the decimal point is set as a separator so that when I later paste the results of the SelectionSumCopy macro, it pastes the dollars in one cell, and the cents in the cell next to it.
Is there some way to “unset” the separator character, or make it paste as a single number, or some other solution?
Thanks,
Ken