Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1
Default transpose data between columns, rows or cells


Hi,

How can I switch data between cells, rows or columns in one step? For
instance, if I want to switch the contents of cells A1 and B1, how do I
do that without having to retype everyting, and without having to use a
third column (that's what I do now: first I copy B1 to C1, then A1 to
B1, then C1 to A1, then delete C1 - this method is obviously very
tedious...).

Tnx,
John


--
jonnel
------------------------------------------------------------------------
jonnel's Profile: http://www.excelforum.com/member.php...o&userid=36946
View this thread: http://www.excelforum.com/showthread...hreadid=566598

  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4,393
Default transpose data between columns, rows or cells

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
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"jonnel" wrote in
message ...

Hi,

How can I switch data between cells, rows or columns in one step? For
instance, if I want to switch the contents of cells A1 and B1, how do I
do that without having to retype everyting, and without having to use a
third column (that's what I do now: first I copy B1 to C1, then A1 to
B1, then C1 to A1, then delete C1 - this method is obviously very
tedious...).

Tnx,
John


--
jonnel
------------------------------------------------------------------------
jonnel's Profile:
http://www.excelforum.com/member.php...o&userid=36946
View this thread: http://www.excelforum.com/showthread...hreadid=566598



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inputting data to one worksheet for it effect another daedalus1 Excel Discussion (Misc queries) 1 June 25th 06 05:39 PM
Sort multiple rows by data in certain columns lbabli Excel Discussion (Misc queries) 1 October 28th 05 11:48 PM
Find data in columns, then place in rows couriced Excel Worksheet Functions 2 September 29th 05 06:44 PM
extract data from a range of cells in rows or columns when a date. Dartyon Excel Worksheet Functions 0 February 24th 05 11:37 PM
repeated transpose from rows to columns with unequal groups kraymond Excel Discussion (Misc queries) 3 December 20th 04 03:39 PM


All times are GMT +1. The time now is 11:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"