transpose two rows of data

S

S. H. Drew

I have data on two rows and I want to flip them., i.e., I want to move the
data in row 1 to row 2 and vice versa. Any way to do this? All I've been
able to do is a cut and paste, which is really time-consuming. Thanks in
advance for your help!
 
J

Jason Morin

Copy the data, click on a new cell, and go to Edit >
Paste Special > Transpose.

HTH
Jason
Atlanta, GA
 
J

JE McGimpsey

One way:

This is almost instantaneous:

Public Sub FlipRowValues(Optional rFirstRow As Range, _
Optional rSecondRow As Range)
Dim vTemp As Variant
If rFirstRow Is Nothing Then _
Set rFirstRow = Selection(1, 1).EntireRow
If rSecondRow Is Nothing Then _
Set rSecondRow = Selection(2, 1).EntireRow
vTemp = rSecondRow.Value
rSecondRow.Value = rFirstRow.Value
rFirstRow.Value = vTemp
End Sub

you can assign a keyboard shortcut or a toolbar to this macro, or run it
from Tools/Macro/Macros (it won't show up in the list since it has
arguments, but you can type FlipRowValues in the text box and hit Run).
 
Top