transpose two rows of data

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!
0
SHDrew (12)
11/22/2004 10:05:01 PM
excel.misc 78881 articles. 5 followers. Follow

3 Replies
720 Views

Similar Articles

[PageSpeed] 59

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

HTH
Jason
Atlanta, GA

>-----Original Message-----
>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!
>.
>
0
Jason
11/22/2004 10:23:21 PM
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).



        In article <CE9E905B-6ABD-4A23-A8DB-4FDB84913FA1@microsoft.com>,
 "S. H. Drew" <SHDrew@discussions.microsoft.com> wrote:

> 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!
0
jemcgimpsey (6723)
11/22/2004 10:30:39 PM
One way ..

Assume your data is in Sheet1, in A1:Z2

In Sheet2
-------------
Put in A1: =OFFSET(Sheet1!$A$1,-ROW(A1)+2,COLUMN(A1)-1)
Copy A1 across to Z1, then fill down to Z2

-- 
Rgds
Max
xl 97
--
GMT+8, 1� 22' N 103� 45' E
xdemechanik <at>yahoo<dot>com
---
"S. H. Drew" <SHDrew@discussions.microsoft.com> wrote in message
news:CE9E905B-6ABD-4A23-A8DB-4FDB84913FA1@microsoft.com...
> 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!


0
demechanik (4694)
11/22/2004 10:34:32 PM
Reply:

Similar Artilces:

counting blocks of data
this is a sample of a large block of data I have. A block of data is represented by the letter A until the next cell is Blank. For E.G. row 1 has 2 blocks of data. the 1st block is row1, col3 and 4 and the next block is column 9. row 2 has 2 blocks. Col3,col4 and col5 is the 1st block and column 8 & 9 is the 2nd block. Row 3 has 1 block only. column 6&7 Row 4 has 0 blocks and row 5 has 1 block because all the A's are in adjacent cells. 1 2 3 4 5 6 7 8 9 Row 1 A A A Row 2 A A A A A Row 3 A A Row 4 Row 5 A A A A Thank you all for you...

Converting rows of data into columns
Is there a simple way to do this without creating a Pivottable? Ian If the number of rows does not exceed 256 you can use Copy>Paste Special>Transpose. Or use the TRANSPOSE Function(again limited) Gord Dibben Excel MVP On Tue, 17 Aug 2004 10:49:03 -0700, "Ian McD Wood" <ian.mcdw@millenn.co.uk> wrote: >Is there a simple way to do this without creating a Pivottable? ...

If "yes" then require data in another field
I have two fields on a form: one a "check box" and another a "combo list" If the check box = Yes, then I want the field for the combo list to require data. I can make it go the field that I want the date inserted, but I cannot seem to figure out how to make it mandatory for the user to insert data from the drop down list if the check box = yes. Use the Exit event of the ComboBox and Cancel = True If Len(Me.ComboBox & "") = 0 Sheryl wrote: >I have two fields on a form: one a "check box" and another a "combo list" > >If t...

How can I use Outlook in two computers (my PC and my laptop)? I o.
How can I use Outlook in two computers (my PC and my laptop)? I can only see my incoming emails in my PC, but not in my laptop; even though I have configured Outlook in both computersto received the incoming emails to my university account. "osiris" <osiris@discussions.microsoft.com> wrote in message news:9C5ACFC5-3859-4FB0-BC20-3AC7A9B5F6A3@microsoft.com... > How can I use Outlook in two computers (my PC and my laptop)? I can only > see > my incoming emails in my PC, but not in my laptop; even though I have > configured Outlook in both computersto received th...

vba for hiding certain rows
This is a multi-part message in MIME format. ------=_NextPart_000_001E_01C356C2.668767E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Good evening All, I am looking for some simple vba to hide rows that fit a certain = criteria: I have a results worksheet (entirely formula driven from data in another = worksheet), a simplified version as follows, A B C D (This = column D is the sum of A,B &C) 1 Header Header Header Header 2 1 2 ...

Dispatch the CPU between the two queuing processes
Hello, How and where can we dispatch the CPU between the two queuing processes : - Timesheet Queue on Published database. - Project Queue on Draft database. Thanks for your help Project Server 2007 SP2 + Dec CU on Windows Server 2003 ...

Calendar Events go to two people only one selected
Hello, I have a client who receives calendar events but at the same time another client gets them as well. The odd thing is that only his name is selected by the sender for an event. I checked his workstation, he doesn't have any rules. It happens even if his workstation is turned off, the other person gets the invite. Any other places I should look? Check the delegates for that user. The other user might be delegate, meaning they get a copy of all the calendar information(if thats how its setup). Thanks - I thought I had done that - perhaps I'm looking in the wrong pla...

Two sites with SBS system each
SBS 2003. Want to have all email for both sites to come into a single site (Melbourne) and have email for the 2nd site (Sydney) sent up the VPN to the other exchange server. The Sydney exchange server to use the Melbourne exchange server across the VPN to send out. Preferably the Global address book shows users in both system. This is easy to do in a Novell GroupWise environment because it support Post Offices (exchange) in different trees being in the same email system. How can I do this in MS environment please. ...

Re: outlook 2002 data file urgent!
Hi, I deleted the outlook profile from mail in the control panel and now when I open outlook all the addresses and emails are not there. If i go to the data files, they are still there. How to i setup outlook to look at the original data files? Is there a way to go back to default? Will system restore help and is that available on the XP home edition? Any help would be greatly appreciated Thanks! Pablo ...

Last row + rank help
I am running Excel 2003 and I am trying figure out how I can find the last row of data in one sheet and use that range to calculate rank on a separate sheet. lr = Cells.Find("*", Cells(Rows.Count, Columns.Count) _ , , , xlByRows, xlPrevious).Row -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett@gmail.com "Opal" <tmwelton@hotmail.com> wrote in message news:efea394d-9b5d-4c39-9150-5b1252bbe40b@c28g2000vbc.googlegroups.com... >I am running Excel 2003 and I am trying figure out > how I can find the last row of data in...

A get/change operation on table 'ME_Signature_Setup' failed accessing SQL data
Hi.... We are on Great Plains 7.5 with MS-SQL. We recently installed Great Plains 7.5 on one of the client machines and while printing a test check we faced the following error: 'A get/change operation on table 'ME_Signature_Setup' failed accessing SQL data' On clickking "More Info" it says: 'Number of results columns doesnt match table definition.' First, i though its a rights issue, but it seems to be soemthing esle. We have SP7 installed on that machine, we also have Mekorma Micr 2.1.13.0 on that machine. Any help on this issue will be highly appreciate...

Can't Scroll (Upwards) Past Row 144
This is quite possibly the weirdest thing I've ever seen Excel 97 do. just received a monthly inventory report from our storage facility, an I went to extract all our (my departments) data from the master sheet Select those rows, copy, open a new workbook, and paste. All well an good. Scroll to the bottom of the sheet to update some details that I notice were incorrect. Update fine. Start scrolling upwards slowly, to vie the rest of the list. All well and good. Reach row 144 (at the top of the screen). Stops. I scroll down the back up again... Stops. PgUp. Stops. Arrow keys. Stops. I s...

Selecting specific data
Hi Guys and Gals If I have Cells A1 - A20 each having a number from 1 - 20 and then Cells B1 - B20 each represent an item corresponding to that number ie, A1=1, B1=Walls A2=2, B2=Floor and so on. (all on sheet 1) Now, if on sheet 2 I have a table and in cell A1 of that table I were to enter a number, say 2, how would I get cell B1 to select the correct item corresponding to that item number, ie Floor? -- Thanks in advance Lee One way: =VLOOKUP(A1,Sheet1!A:B,2,FALSE) But if your table in Sheet1 just has numbers in sequential order from 1 to N, you could instead ignore the first ...

Outlook On Two Pooters
Hi there, I'm just wondering if anyone on this Newsgroup would be able to explain to a total moron how to set up Outlook on two different computers that read the same datafile. I have a desktop and a notebook, and I'd like to have access to my contacts and old emails when I go out, and should I make any changes or additions whilst I'm on the road I'd like to have them automatically sync up when I get back to the office. I have tried to tell my notebook's Outlook to use the datafile on the desktop, but it comes back saying that the .pst file cannot be shared, ...

External data references in EXCEL 2002
I want to remove all references to external data (ODBC link to SQL server) from my workbook. I have deleted the columns that contained the data, yet the named ranges are still showing in the properties page. How do I remove all the references? This also invokes XLQUERY.XLA macro. ...

Copying data between atbs in a custom form
Hello I have a custom form. Form is a modified appointment with a second tab for a custom form. Trying to copy data from custom form/second tab to first tab which a standard Appointment page. First trying to make sure that a user is in a second tab which is called Transportation Form. When code is executed it should take data from some fields in Transportation Form and copy it over to Appointment tab/first tab. Not sure how to call tabs. Any help would be appreciated Sub Appt_From_From() Dim txtBody1 As String Dim txtBody2 As String Dim txtBody3 As String Dim objCurContact As...

tricky problem with 14800 rows (collating figures)
Hi, I'm trying to sort through a very large amount of data, and to get averages from it. (14800 ows in the full version !!). What I need to do is 1) Find out how many times each DELAY (column B1) appears for each AIRLINE (A1) and give a total for each airlines (This is to show which delay affects individual airlines the most) 2) Add up the CPU time spent on delays for each airline 3) Collate the number of ABENDs-periairline, and CPU time-per-airlines in to a grand total I need hedlp with this one as it is totally out of my depth. A1 B1 C1 AIRLINE DEL...

IF formula with multiple data range in cell
I'm trying to create an IF formula that returns data after searching a cell that contains more than one data range. For ex: Cell B3 contains GCVW-00001, GCVW-00002 I need the formula in C3 to return Yes if B3 contains GCVW-00001 and I need the formula in D3 to return Yes if B3 contains GCVW-00002 I'm able to get the formula to return yes or no correctly if cell B3 contains either GCVW-00001 or GCVW-00002, but the formula won't work if it contains both at the same time. right now my basic formula looks like: =IF(B3="GCVW-00001","Yes","No&q...

transposing info.
I want to transfer information from one spreadsheet to another with different titles on the columns. How do I do this? I want to direct the values on the column which has a different title column to the sheet that I want to move it to. Thanks guideme wrote: > I want to transfer information from one spreadsheet to another with > different titles on the columns. How do I do this? > > I want to direct the values on the column which has a different title > column to the sheet that I want to move it to. > > Thanks This is more of moving data to another sheet which has di...

Excluding Entire Data Fields in a Graph
I am trying to figure this out and there are a lot of other posts that skirt around this subject but none that specifically address my needs. I am using a bar graph and lets say for example I am using a chart of fruit picking that looks like this: Jun Jul Aug Sep Lemons 10 15 18 7 Apples 5 10 15 29 Oranges 9 20 17 33 Now my bar graph shows three bars labeled Lemons, Apples and Oranges. I have a drop down box where I can choose "Citrus" or "All Fruit" When I choose citrus the entire row of Apples in ...

Can I merge two money files?
I am running Home & Business 2007. We tracked our finances from Jan 1-June 30 in one file and Jul 1-today in another. (The nature of the business change and its owners). So, now our accountant would like to combine the informaiton into one file. Can this be done without me manually entering each transaction? Any help is APPRECIATED!! Thanks. In microsoft.public.money, jrwillden wrote: >I am running Home & Business 2007. We tracked our finances from Jan 1-June 30 >in one file and Jul 1-today in another. (The nature of the business change >and its owners). So, now our ac...

how much is too much data for a cell?
a cell should hold 32,000 characters if i am not mistaken. i have a large spreadsheet that has codes, their use, description and the # of times they have been 'hit'. most of the information fits in a cell very easily but i have one description that is huge. i made the cell 255x409 which is the max and what happened was part of the information showed and then the rest of the cell was blank. at that cell size there was more than enough room for all the data but for some reason it would not all show. i tried things like changing the alignment and it is on wrap text. i tried selectin...

Save filtered rows as web page, efficiently
Single-sheet inventory, one item per row. From this inventory, I want to save a subset as a web page. The subset is selected by filtering on data in one column of the sheet. There are multiple such subsets. Issue 1: I can select only the filtered rows with Edit -> GoTo -> Special -> Visible cells only, but if I then Save as Web Page, the entire sheet is saved in HTML, with the rows that were not selected still present in the HTML, but hidden via CSS. This makes the HTML much, much larger than is needed to display the selected rows. Current workaround: Edit -> Cop...

program that check cable between two com ports.
Hello, I have a cable that is connected between com port 1 and com port 2. I want to sent data from com port 1 and receive it by com port 2. Is there any free program that can check whether the cable is good ? Thanks :) And remember you would need a cable called a NUL Modem cable to successfully do this. -- Frank "Richard Formby" <rf302@cueword.com.au> wrote in message news:PTb0c.80927$Wa.56280@news-server.bigpond.net.au... > > "Eitan" <nobody@nospam_please.com> wrote in message > news:unJQlti$DHA.3500@tk2msftngp13.phx.gbl... > > Hello, >...

External Data in Pivot Tables
I have a series of files in Excel that I would like to summarize with Pivot Table. The files are too big -- too many lines -- to combine an run the table. Is there a way to link multiple external files into on workbook and run a table? I've explored the external data option, bu I can only get one file with it. Thanks Staci -- Message posted from http://www.ExcelForum.com You could use MS Query to import the data (Data>Import External Data> New Database Query) and use an SQL UNION statement to combine the data into one table. SPenney wrote: > I have a series of files in...