Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / July 2006

Tip: Looking for answers? Try searching our database.

transpose data between columns, rows or cells

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jonnel - 31 Jul 2006 13:40 GMT
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

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.