Hi,
How can I switch data between cells, rows or columns in one step? Fo
instance, if I want to switch the contents of cells A1 and B1, how do
do that without having to retype everyting, and without having to use
third column (that's what I do now: first I copy B1 to C1, then A1 t
B1, then C1 to A1, then delete C1 - this method is obviously ver
tedious...).
Tnx,
Joh
Bernard Liengme - 31 Jul 2006 14:24 GMT
Insert a new column; fill with integers 1,2,3 and do a sort on this and the
column of interest.
Delete the helper column when done.
OR use this subroutine with the first of the two cells as the activecell
Sub transpose()
Set cell1 = ActiveCell
Set cell2 = ActiveCell.Offset(1, 0)
temp = cell1
ActiveCell = cell2
ActiveCell.Offset(1, 0) = temp
End Sub
Change the (1,0) to (0,1) to transpose horizontally

Signature
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email
> Hi,
>
[quoted text clipped - 7 lines]
> Tnx,
> John