|
Reversing Rows and Columns in a Spreadsheet
From NeoWiki
Revision as of 12:46, 30 August 2007 (edit) Jgd (Talk | contribs) (use of TRANSPOSE function in Calc. Needs polish. Thanks.) ← Previous diff |
Current revision (23:33, 23 December 2007) (edit) (undo) Valterb (Talk | contribs) (botlangbar -> IT) |
||
(4 intermediate revisions not shown.) | |||
Line 1: | Line 1: | ||
{{Fixme}} | {{Fixme}} | ||
- | Let us suppose that you have a spreadsheet the first column | + | Let us suppose that you have a spreadsheet in which the first column contains data, and you want to display these data in the first row of the following sheet. You can easily get that result by using the array function '''TRANSPOSE'''.<br> |
- | More generally, this function allows you to reverse rows and columns of a cell range | + | More generally, this function allows you to reverse rows and columns of a cell range in Calc, in the same sheet or in a different sheet of your document. |
In the example below, the cell range A1:B5 of Sheet1 contains the following data: | In the example below, the cell range A1:B5 of Sheet1 contains the following data: | ||
Line 23: | Line 23: | ||
*Click in the cell C1 | *Click in the cell C1 | ||
*In the formua bar, type '''=TRANSPOSE(A1:B5)''' | *In the formua bar, type '''=TRANSPOSE(A1:B5)''' | ||
- | *Press the {{key|Cmd-Shift-Return}} keys. Calc | + | *Press the {{key|Cmd-Shift-Return}} keys. Calc automatically places the formula in curly braces, and you get the following table: |
Line 41: | Line 41: | ||
- | You | + | You can also select the range C1:G2, but the '''=''' sign must be in the cell C1. |
To display those data in another sheet, follow the same steps, but the formula will be: '''=TRANSPOSE(Sheet1.A1:B5)'''. | To display those data in another sheet, follow the same steps, but the formula will be: '''=TRANSPOSE(Sheet1.A1:B5)'''. | ||
- | {{botlangbarEN|[[Fr:Inverser les Lignes et les Colonnes dans un Tableur |Français]]}} | + | {{botlangbarEN|[[Fr:Inverser les Lignes et les Colonnes dans un Tableur |Français]] [[It:Scambia_Righe_e_Colonne_in_Calc|Italiano]]}} |
[[Category:Tips and Hints]][[Category:NeoOffice]] | [[Category:Tips and Hints]][[Category:NeoOffice]] |
Current revision
Let us suppose that you have a spreadsheet in which the first column contains data, and you want to display these data in the first row of the following sheet. You can easily get that result by using the array function TRANSPOSE.
More generally, this function allows you to reverse rows and columns of a cell range in Calc, in the same sheet or in a different sheet of your document.
In the example below, the cell range A1:B5 of Sheet1 contains the following data:
Quarter | Month |
---|---|
First | January |
Second | April |
Third | July |
Fourth | October |
To display these data on two rows and five columns, in the cell range C1:G2 of the same sheet, proceed as follows:
- Click in the cell C1
- In the formua bar, type =TRANSPOSE(A1:B5)
- Press the Cmd-Shift-Return keys. Calc automatically places the formula in curly braces, and you get the following table:
Quarter | First | Second | Third | Fourth |
---|---|---|---|---|
Month | January | April | July | October |
You can also select the range C1:G2, but the = sign must be in the cell C1.
To display those data in another sheet, follow the same steps, but the formula will be: =TRANSPOSE(Sheet1.A1:B5).