this code flips a whole range horizontally, one row at a time is a pain. enjoy
Sub FlipHorizontal()
On Error GoTo EndMacro
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
Set Rng = Selection
rw = Selection.Rows.Count
cl = Selection.Columns.Count
'If Rw > 1 And cl > 1 Then
' MsgBox "Selection May Include Only 1 Row or 1 Column", _
' vbExclamation, "Flip Selection"
'Exit Sub
'End If
If Rng.Cells.Count = ActiveCell.EntireRow.Cells.Count Then
MsgBox "You May Not Select An Entire Row", vbExclamation, _
"Flip Selection"
Exit Sub
End If
If Rng.Cells.Count = ActiveCell.EntireColumn.Cells.Count Then
MsgBox "You May Not Select An Entire Column", vbExclamation, _
"Flip Selection"
Exit Sub
End If
'If Rw > 1 Then
' ReDim Arr(Rw)
'Else
' ReDim Arr(cl)
'End If
Stop
ReDim Arr(rw, cl)
For cc = 1 To cl ' = Rng.Columns.Count
For rr = 1 To rw 'rr = Rng.Rows.Count
Arr(rr, cc) = Rng.Cells(rr, cc) '.Formula
a = Arr(rr, cc)
Next
Next
Stop
'copy arry to range flippingnhorizontal
cc = cl
For a = 1 To cl ' to loop the columns
For rr = 1 To rw 'rr = Rng.Rows.Count
Rng.Cells(rr, cc) = Arr(rr, a) '= .Formula
Next
cc = cc - 1
Next
EndMacro:
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
End Sub