Transform an Excel table into a column
Solved
John
-
John -
John -
Hello everyone,
For my work, I'm looking to transform an Excel table into a column.
Example:
My table is:
A1 = 1 B1 = 2 C1 = 3
A2 = 4 B2 = 5 C2 = 6
I would like to have a column that fills up as follows:
A1 = 1
A2 = 2
A3 = 3
A4 = 4
A5 = 5
A6 = 6
I'm therefore looking for a function that could do this automatically since my table of values has 24 columns and 365 rows.
The best would be an Excel formula as I'm not familiar with VBA
Thank you very much for your help in advance :)
Configuration: Windows / Chrome 56.0.2924.87
For my work, I'm looking to transform an Excel table into a column.
Example:
My table is:
A1 = 1 B1 = 2 C1 = 3
A2 = 4 B2 = 5 C2 = 6
I would like to have a column that fills up as follows:
A1 = 1
A2 = 2
A3 = 3
A4 = 4
A5 = 5
A6 = 6
I'm therefore looking for a function that could do this automatically since my table of values has 24 columns and 365 rows.
The best would be an Excel formula as I'm not familiar with VBA
Thank you very much for your help in advance :)
Configuration: Windows / Chrome 56.0.2924.87
4 answers
Hello everyone,
if your data is, as Philou10120 suggests, in A1:X365 and the result in AA1:AA8760, you select AA1:AA8760 and enter this array formula:
best regards
if your data is, as Philou10120 suggests, in A1:X365 and the result in AA1:AA8760, you select AA1:AA8760 and enter this array formula:
=INDEX($A$1:$X$365;1+INT((ROW($1:$8760)-1)/24);1+MOD(ROW($1:$8760)-1;24))
best regards
Hello,
Here is an example in VBA if you can't find a formula:
@+ The Woodpecker
Here is an example in VBA if you can't find a formula:
Sub For_Each_Next_Range() Dim FL1 As Worksheet, Cell As Range, Range As Range Dim i As Integer i = 1 Set FL1 = Worksheets("Sheet1") 'adapt sheet With FL1 'Determination of the range of cells to read 'Can be written using the range object of the range 'For Each Cell In .Range("B3:E15") 'or using the Range object of the range Set Range = .Range("A1:E15") 'adapt range For Each Cell In Range 'Value of the read cell Range("F" & i) = Cell.Value 'adapt reception column i = i + 1 Next End With Set FL1 = Nothing Set Range = Nothing End Sub @+ The Woodpecker
Hello John
Without a macro, if your data is in column A1:X365, place this formula in AA1
=INDIRECT(ADDRESS(COLUMN()-26,ROW(),1,1,"Sheet1"),1)
then sort this up to column OA and drag the row AA1:OA1 down to row 24
--
It is by forging that one becomes a blacksmith. - It is at the foot of the wall that one sees the bricklayer - one always learns from their mistakes.
Without a macro, if your data is in column A1:X365, place this formula in AA1
=INDIRECT(ADDRESS(COLUMN()-26,ROW(),1,1,"Sheet1"),1)
then sort this up to column OA and drag the row AA1:OA1 down to row 24
--
It is by forging that one becomes a blacksmith. - It is at the foot of the wall that one sees the bricklayer - one always learns from their mistakes.
Hello John (and others).
Non-array formula, hence more complicated, allowing to display in a file a column of 8760 cells, based on a table of 24 x 365 cells located in Sheet1 of another file called Workbook5
=INDEX([Workbook5]Sheet1!$A$1:$X$365;CEILING(ROW() /24;0);IF(MOD(ROW();24)=0;24;MOD(ROW();24)))
--
Retirement is great! Especially in the Caribbean... :-)
Raymond (INSA, AFPA, CF/R)
Non-array formula, hence more complicated, allowing to display in a file a column of 8760 cells, based on a table of 24 x 365 cells located in Sheet1 of another file called Workbook5
=INDEX([Workbook5]Sheet1!$A$1:$X$365;CEILING(ROW() /24;0);IF(MOD(ROW();24)=0;24;MOD(ROW();24)))
--
Retirement is great! Especially in the Caribbean... :-)
Raymond (INSA, AFPA, CF/R)