Is it possible to switch the rows and columns?

Is it possible to switch the rows and columns of a table? The reason I ask is that it would be easier for me to input the data with the number at the top of a column and the fields going down. But it would be easier to read the data with the number on the left and the fields going to the right. Is it possible to switch a table in this way?

mahongue wrote:
Is it possible to switch the rows and columns of a table? The reason I ask is
that it would be easier for me to input the data with the number at the top
of a column and the fields going down. But it would be easier to read the
data with the number on the left and the fields going to the right. Is it
possible to switch a table in this way?
It sounds to me as though you wish to transpose a table so that the original is changed from rows to columns and from columns to rows, as in the following:
Table 1
    A   B   C
========
1   o   p   q
2   r   s   t
3   u   v   w
Table 2
    A   B   C
========
1   o   r   u
2   p   s   v
3   q   t   w
You are right - it would be nice to have a menu item to magically transpose a selected block of cells. But there isn't one. So...
One way to solve this is to use the index() and transpose() functions to accomplish row and column cell transposition. If you are going to use a 1:1 cell correspondence and change the header columns and rows also, you can use this:
   =INDEX(TRANSPOSE(Table # :: <range>),ROW(),COLUMN())
where Table # and <range> is substituted as in the following fashion:
   =INDEX(TRANSPOSE(Table 1 :: $A$1:$C$3),ROW(),COLUMN())
Create a second table. Copy the modified formula above with the appropriate substitutions, select the range you wish to have your transposition inserted into (must match the transposed cell dimensions of the original range), paste the forumula and voila! the cells will be transposed.
Cautions:
o The target table must match the swapped cell length and width dimension. For example, if the original data range is 6 columns wide by 4 rows deep, then the corresponding table or range to hold the transposition must be 4 columns wide by 6 rows deep.
o If your transposed data block is to be offset from the origin of the new table, then you will need to include a subtractive offset into your cell formula, since in the transpose() function the data in the master data range is referenced from its position with the master range, not its cell position in the table. Such an offset is necessary because this example formula uses the target row and column numbers to arrive at indexed positions.
For example, if the new data range is to be offset one column to the right and one row below from the target table's origin then you must subtract (-1) from the cell and from the column references in the formula:
  Example:
  =INDEX(TRANSPOSE(Table 3 :: $B$2:$D$4),ROW()-1,COLUMN()-1)
If someone has a better solution I'd be glad to hear of it.

Similar Messages

  • How can i open a PDF bank statement in numbers so that the rows and columns contain properly aligned data from statement?

    how can i open a PDF bank statement in "numbers" so that the rows and columns contain properly aligned data from statement?

    Numbers can store pdfs pages or clippings but does not directly open pdf files.  To get the bank statement into Numbers as a table I would open the bank statment in Preview (or Skim) or some pdf viewer.
    Then hold the option key while selecting a column of data.
    Then copy
    Then switch to numbers and paste the column into a table
    Then repeat for the other columns in the pdf document
    It would be easier (in my opinion) to download the QFX or CSV version from your bank

  • How to increase the row and Column length of Bex query in EP Portal 7.3

    Dear All,
    Please let me know the process  to Increase the Rows and Columns  Size of Bex Query in Enterprise Portal  of SAP  7.3 .
    Please  let settings to increase rows up 10000 and column 100 in one page.
    Thanks
    Regards,
    Sai

    Dear All,
    Please find the attached screen shot.
    The report be open with 4 or 5 columns and 5 or 6 rows.
    So, please  let me know how to increase the length of the table.
    Do the needful for me to over come this issue.
    Thanks
    Regards,
    Sai.

  • How to Increase the Rows and Columns Size of Bex Query in Enterprise Portal  of SAP  7.3

    Dear All,
    Please let me know the process how to Increase the Rows and Columns  Size of Bex Query in Enterprise Portal  of SAP  7.3 .
    Currently I am getting Only  4 columns and 10 rows in One Page .And I am getting 1,2 etc tabs for both row and column. So i want to increase the column length more than 100  and row length more than 10000.
    Please suggest me a suitable solution to over come this issue.
    Please find the Below screen shot.
    Thanks
    Regards,
    Sai

    Dear All,
    Please find the attached screen shot.
    The report be open with 4 or 5 columns and 5 or 6 rows.
    So, please  let me know how to increase the length of the table.
    Do the needful for me to over come this issue.
    Thanks
    Regards,
    Sai.

  • Summing the Rows and Columns in an Array

    I am importing a 2-dimensional array of integers.(which is held in a 2-dimensional array)
    I need to store the row sums and column sums in separate 1-dimensional arrays.
    I can get the integers in and print out a list along with the grand total(sum of all).
    But, how do I pass each row's and each column's value in to my sumRow and sumCol methods to get the sum for each row and each column?
    Can I do the row and column summing in the same "for" statement where I calculate the "grand total"? Or am I making this more difficult than it is?
    Would appreciate any help.
    This is what I have so far:
    import java.awt.Graphics;
    import java.applet.Applet;
    public class TwoWayTable extends Applet {
         int numRows;
         int numCols;
         int [] [] cell;
         int [] rowSum;
         int [] colSum;
         int grandTotal;
    public TwoWayTable(int [][] data){
    grandTotal = 0;
    cell = new int [data.length][data.length];
    for(int i = 0; i < data.length; i++)
    for(int j = 0; j < data.length; j++){
         cell[i][j] = data[i][j];
    grandTotal += cell[i][j];
         System.out.println(cell[i][j]);
    System.out.println(grandTotal);
    public int sumRow(int [] data2){
         int rowaccumulator=0;
         rowSum = new int[data2.length];
         for(int numRows = 0; numRows < rowSum.length; numRows++){
         rowaccumulator += rowaccumulator + rowSum[numRows];
              return(rowaccumulator);
    public int sumCol(int [] data3){
         int colaccumulator = 0;
         colSum = new int[data3.length];
         for(int numCols = 0; numCols < colSum.length; numCols++){
              colaccumulator += colaccumulator + colSum[numCols];
              return(colaccumulator);

    Thanks for your input.
    I'll make the changes that you suggest.(after this)
    My output prints:
    4 6 3 8 21
    9 1 5 3 18
    13 7 8 11 39
    numbers are right, but I need to format the table
    the output needs to look like this:
    int int int int | rowsum
    int int int int | rowsum
    colsum colsum colsum colsum | total
    How do I do this?
    I have no idea?
    I'm supposed to call a "void setMargins( )" method to line this up, without
    using the exotic formatting in the IO library.
    I'm also supposed to use "public String toString( )"
    This is what I have so far:
    import java.awt.Graphics;
    import java.applet.Applet;
    public class TwoWayTable extends Applet {
    int numRows;
         int numCols;
         int [] [] cell;
         int [] rowSum;
         int [] colSum;
         int grandTotal;
    public TwoWayTable(int [][] data){
    cell = new int [data.length][data.length];     
    for(int i = 0; i < data.length; i++){
    for(int j = 0; j < data.length; j++){
         cell[i][j] = data[i][j];
    calcTotals(cell);
    for(int i = 0; i < cell.length; ++i){
    for(int j = 0; j < cell.length; ++j){
    System.out.print(cell[i][j] + " ");
    System.out.println(rowSum[i] + " ");
    for(int j = 0; j < cell.length-1; ++j){
    System.out.print(colSum[j] + " ");
    System.out.println(colSum[cell.length-1] + " " + (grandTotal));
         public void calcTotals(int [][] data2){
              grandTotal = 0;
              rowSum = new int[data2.length];                         
              colSum = new int[data2.length];                         
              for(int numRows = 0; numRows < data2.length; numRows++){
              for(int numCols = 0; numCols < data2.length; numCols++){
                   grandTotal += data2[numRows][numCols];               
                   rowSum[numRows] += data2[numRows][numCols];
                   colSum[numCols] += data2[numRows][numCols];

  • JTable - Swapping the Rows and Columns

    This issue was raised in the Java Programming forum. Received initially as a weird requirement, it now seems that it is more common than you might think. Under it's original title it was "JTable - Limitation or Not?"
    I introduced the topic here so that the thread perspective can include more experienced Swing developers.
    The JTable in it's default layout is intended to hold database tables with records in rows. But what if you want records in columns?
    Some have said why? Just accept the row layout. Others have said use a customised form. Both reasonable views. Despite this, others report that the inherrited power of the JTable is worth leveraging and they have been doing it for years. Albeit with messy code in certain cases.
    This is a clear candidate for a popular derived component. If the existing JTable were renamed as a JTableRecordPerRow I am describing a JTableRecordPerColumn. The corresponding Table Model must naturally have a getRowClass method and no getColumnClass method.
    Java is good at seperating data from display issues so essentially this is only a display issue. The data representation is unaffected.
    While this may be so, the TableModel for a JTable makes the link from the display to the data so it must have knowledge about cell type to trigger the correct cell editor for example.
    I think it is fair to say that the standard JTable has not be designed with alternative row/column or column/row displays in mind. Hence a single getColumnClass method. However implementing a Table model which exchanges columns for rows is a good start. This leaves a few loose ends where editting is concerned.
    While this may not be an ideal topic for anyone just learning Swing I have been encouraged to consider the general case within the limitations of the cell types normally supported by the default Table model.
    I would have a guess that this is an established component in many private Java libraries already.
    Views and experience on this topic extremely welcome.

    It appears to me that while interchanging the rows and columns of a JTable is not trivial it is still worthwhile as a workhorse component.
    Perhaps the original design could have allowed for an aternative layout manager of somekind but this could easily have made description of records/rows and fields/columns confusing.
    I will probably get this summary wrong but I aill attempt to collate the neatest approach as I see it. Criticisms or shorter steps welcome. My thanks to the original contributors traceable from this thread.
    In the descriptions below a distinction is made between the normal internal data model representation of a row, called "mrow", and the displayed form "row".
    Only the TableModel need be changed.
    1 Use row 0 to show the headers by a)disabling the normal TableHeader renderer b)setting the cell renderer for column 0 to the default renderer used by the TableHeader and c)using the getValueAt method to return mcol header values for the row entries.
    2 For other row, col values to getValueAt return the value at mcol, mrow where mcol==row-1 & mrow==col.
    3 Create a new getCellClass(col,row) method to return the class where mrow==0 and mcol==row-1. Note that I am only trying to immitate the common use of of a database record per mrow here.
    4 Override a)getCellRenderer and b)getCellEditor to use getCellClass
    Four steps with seven parts seems worth it to me.
    The power of Swing!
    Many thanks to all.

  • Why the row and column reverses?

    I have an image 736 pixels (row) and 554 pixels (column). In the IMAQ ColorImageToArray.VI, the VI has a 2D array with Y axis as the first dimension (Dim) of the array and X-axis as the second Dim. Why do we break away from the tradition of the first dimension of a 2D-array is the row and the second dimension is column? When I go to use the Index Array function, the index 0 is row and index 1 is column, as the little hint or tip trying to give me clue.
    I am confused.
    Attachments:
    image_2.jpg ‏76 KB
    NIquestion.vi ‏30 KB

    Don't know the answer but I can give an idea that just might make make sense.
    It has to do with keeping the various indexes of multi-dimensional arrays straigt in my head.
    Think of a 7-d array as a library. To find a letter on a page of a book you would first go the correct Floor.
    Then the correct isle of shelves.
    Then the correct shelf.
    Then the book.
    Then the page.
    Then the line (i.e. row).
    then the character on the line (column).
    Using this model higher "d" arrays are just collections of the lower arrays.
    The smallest "d" array is comprised of only columns.
    This model is a lot easier for me to handle, than trying to visualize a 3-d array inside 4-space.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How can I make Numbers respect the row and column locks in an Excel workbook opened in Numbers???

    I have a Windows server app that generates Excel workbooks to be emailed to political campaign volunteers to be loaded into Numbers on an iPad, edited, then emailed back to be posted to the server database.  There are two problems encountered:
    1.  The Excel workbook has the first row (column headings) and first column (route identifier) of cells locked, so that they will not scroll off the screen, but Numbers doesn't respect the locks, so when the user scrolls horizontally or vertically, the column headings and/or the route identifier scroll off the screen.
    2.  The Excel workbook has pop-up "tool-tip" type comments in certain column headings in order to provide the user with the acceptable entries for those columns, but Numbers does not respect those.  When the user touches any of the commented column heading cells, a context menu appears instead of the comment.
    What must I do in the Excel workbook sheets, or what settings can be made in Numbers to correct the above?

    I imported a Numbers '09 file into Numbers on the iPad.  All comments were removed during import. Frozen header row and column were retained.
    Thank you for your responses I must ask, however, when you refer to "importing" the Excel file, are you referring to a two step process whereby the Excel file is first converted by some other process into Numbers format, then opened in the Numbers application - which is what I have to do in my PC application to generate the Excel file, and reverse that process to convert the Excel back into my database format - or are you simply referring to opening the file in Numbers as "importing" it?  And please excuse any ignorance, as I'm not at all familiar with Apple's terminologies.  In fact, I don't own an iPad myself, but rather I have to depend on one of my clients to do the testing for me.
    I imported an XLSX file into Numbers on the iPad.  The file used "freeze panes" to "freeze" the first column and row. Only warning on import was that it changed fonts. It imported without the first row and column frozen and with no comments. Nothing I can do about the missing comments but it was a simple matter to turn the first column & row into headers and freeze them.
    Unfortunately this would not be an efficient  solution, since the end users are, for the most part, elderly political campaign volunteers who are fairly computer illiterate.  These workbooks are actually canvassing lists - known as walklists.  Their purpose is for the volunteers to interview voters, record the results of the interviews, and post the results to a database, which provides the campaigns with valuable strategizing capabilities.  Also, these workbooks have multiple pages - as many as 10 or more.  and from what I infer from the above, the setting changes would have to be made on each page.
    My whole intent in developing this iPad/Tablet methodology was to significantly reduce volunteer's work - which is a recruitment benefit - and eliminate paper.  While the latter would be accomplished, the former would not, and in fact would tend to increase it.  It's necessary to keep the first row - column headings - and the first column - the route identifier - from scrolling off the page, so that the volunteer won't have to keep scrolling up and down and right and left to know what the data are.
    Conclusion: Comments are not supported on the iPad version of Numbers.  Frozen headers are not imported from Excel but can be recreated easily.
    I was previously directed to the Apple website  http://www.apple.com/ipad/from-the-app-store/apps-by-apple/numbers.html which extols the wonders of the Numbers application.  About halfway down the page there's a section regarding, "Sliders steppers and pop-ups".  The web page states that pop-ups can be set up but, being a marketing site, gives no indication whatsoever as to how it's done.  I was hoping someone could tell my if there's any way to carry them over from an Excel file.

  • Displaying the Row and Column number in the report

    I am trying to show row and column number in the report (not just web preview). I am using Hyperion Reports Version 7.2.5.168

    use a formula column/row. use RANK function in that. (e.g. Rank([A], asc) will sort the rows based on column A values in ascending order)
    you can use this rank in your heading.
    But frankly this is not so easy. You have to do it in a very intelligent way, so that rank gives you column number/row number any how.
    Have a try and let see if you find a appropriate solution.
    Regards,
    Rahul

  • Where'd the row and column headings go?!

    I'm an experienced Excel user trying to learn Numbers....help!
    So, I have a spreadsheet that I just exported to PDF after which all row and column headings disappeared! No idea why this would be or how to get them back short of closing and re-opening the file....please help.

    Move the table away from the top of the sheet, leaving a larger white space at the top and see how that works for you when you export or print.
    Jerry

  • How to get the Row and Column values in ALV (without using Objects)

    Hi All,
    I need to get the Row / Column when double click is used in ALV, I can use the double click event for this. However, I do not want to use the Object Oriented ALV. I want to implement the same functionality using general (using functions) ALV.
    Is there any way to get the row / column values for a Generia (non-OOPs) ALV report.
    Please help.
    Thanks,
    Vishal.

    Hello,
    The only think you have to do is to get the index where the user clicked, and then read the internal table you sent to the alv
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = 'prg_name'
          i_callback_pf_status_set = 'SET_PF_STATUS'
          i_callback_user_command  = 'USER_COMMAND' " this is to the click event!!
          i_callback_top_of_page   = 'TOP_OF_PAGE'
          is_layout                = alv_layout
          it_fieldcat              = alv_fieldcat
          i_save                   = 'A'
          it_events                = alv_events[]
        TABLES
          t_outtab                 = i_totmez.  ---> TOUR IT.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    " then....
    FORM user_commandUSING r_ucomm     TYPE sy-ucomm
                                    ls_selfield TYPE slis_selfield.
    " r_ucomm -> HAS THE STATUS
    " ls_selfield-tabindex  -> HAS THE SELECTED INDEX
    " THEN READ THE INTERNAL TABLE
    " HERE YOU WILL HAVE THE SELECTED ROW
    READ TABLE i_totmez INDEX ls_selfield-tabindex.
    ENDFORM.
    cheers,
    Gabriel P.

  • Getting the row and column number from the caretposition

    Howdy peeps
    Does anyone know how to find out the Line number and column in a JTextPane by using the caret position
    (you know like in text editors where it says 100:4 [line number:character position on row])
    is there a simple way of doing this in a JTextPane?

    im getting a bit confuzzled with this :(
    can someone help me out with a bit more code orientated help? :$
    i have a jTextArea and a JTextField, when i change the caret in the text area i want the JTextField to show the line number and charater position on the row (e.g. 100:4)
    so i assume i need to methods
    e.g.
    getPaneRow
    myint=myPane.getCaretPosition()
    do some wonderful magic code to get the line number
    return line number
    getPaneColumn
    myint=myPane.getCaretPosition()
    do some wonderful magic code to get the column number
    return column number
    is there a magician out there that can give me the magic powder? :)

  • I recently purchased a Macbook Pro w/Snow Leopard.  Subsequently I installed Microsoft Office v.X.  I am getting some unexpected results in Excel and Word.  For Excel the row and column headings are missing and I cannot print.  Work won't print.

    I guess the basic question is ... will Microsoft Office v.X work correctly with MAC OS X 10.6.8?

    m2quared wrote:
    will Microsoft Office v.X work correctly with MAC OS X 10.6.8?
    Since MS stopped supporting Office X a couple of years before SL's release, my guess is no.

  • Display of  Row and Column Headers in NW2004s Bex Analyzer

    Hi all,
    when I open a query with the NW2004s Bex Analyzer (Excel)Frontend <b>Row and Column Headers are not visible</b>. I need to go to <b>"Tools-Options" and check the box  for "Row and Column Headers" which seems to be unchecked by default</b>.
    Is there <b>a possibility to make the Row and Column Headers visible by default when I open a query</b> so that I don't have to use Tools-Options every time.
    Thanks
    Alex

    This is fixed with SP8. The default template doesn't have this specified in SP7. It's a very easy fix. Just specify that the column headers are specified by default. Then save this new workbook as the global workbook template such that all queries use this new template. You can customize this standard template however you like!

  • Lock rows and columns header in a table view report. It is possible?

    hi,
    I have a Dashboard that displays a report in "Table View" with many rows and columns.
    Is it possible to set a lock on the rows and columns like Excel?
    This would have blocked such headers that contain attributes and measures and to browse the report (eg with a scroll bar) had always viewed the headers.
    Can you help me?
    Thanks

    hi,
    please go through this discussion
    Re: SCROLL BAR to FREZZ HEADERS
    thanks,
    saichand.v

Maybe you are looking for

  • Loading Itunes TV show to Video Ipod fails

    I purchased an Itunes season pass for BCS football games. The pregame content and the the short cut version (approx 20 minutes runtime each) loaded fine. When trying to get the full broadcast transfered from Itunes to the Pod (2+ hours of content) it

  • SQL Query for max values!!

    Hi to all, I have four tables Tbl_one Tbl_two Tbl_three Tbl_four the relation between these tables is Tbl_one.SEQ = Tbl_two.SEQ) and tbl_two.case_SEQ = Tbl_four.SEQ AND Tbl_two.ORDER_SEQ = tbl_three.SEQ)) I want a query like this Select tbl_one.com_n

  • Posting GR

    Hello   when i am trying to post the GR it's showing the error msg as "period 005/2011 is not open for account type M and G/L 304000 pls guide me Edited by: Csaba Szommer on May 22, 2011 3:12 PM

  • Power settings not sticking

    When I make changes to the power settings they keep resetting back to what they were originally.  This happened after I did Toshiba recommended updates via the Service Station.  I have tried creating a custom power plan based on an existing one, but

  • Math operations on array in TestStand

    Hi. I have 2 questions 1. Is it possible to multiply an array by a number in TestStand? I know there are some numeric functions available in TestStand but I don't know if like LabVIEW I can multiple ( subtract/add/divide...) all the elements of an ar