mole999
Well-known Member
- Joined
- Oct 23, 2004
- Messages
- 10,524
- Office Version
- 2019
- 2016
- 2013
- Platform
- Windows
A Thought from another thread, anyone have code that would do this (more elegantly)
two cells selected, on a short cut key (something appropriate), swap the data via code
seems simple though I don't recall seeing anything like this on the forum
Code:
Sub Transpose()
Application.OnKey "+^{ALTGR}"
Dim VarA As String
Dim VarB As String
VarA = Range("A1")
VarB = Range("B1")
Range("A1") = VarB
Range("B1") = VarA
End Sub
two cells selected, on a short cut key (something appropriate), swap the data via code
seems simple though I don't recall seeing anything like this on the forum