Split column to rows

hnorgaar

New Member
Joined
Jul 21, 2018
Messages
20
Office Version
  1. 2019
Platform
  1. Windows
Hi, i have a sheet with 2 years, column 1=2010 and column 2=2015
How can I "split" so I get 6 rows like 2010, 2011, 2012, 2013, 2014, 2015? Thx for any input
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
With Power Query

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Added Custom" = Table.AddColumn(Source, "Years", each {[Start]..[End]}),
    #"Expanded Years" = Table.ExpandListColumn(#"Added Custom", "Years"),
    #"Removed Other Columns" = Table.SelectColumns(#"Expanded Years",{"Years"})
in
    #"Removed Other Columns"

Book1
ABCD
1StartEndYears
2201020152010
32011
42012
52013
62014
72015
Sheet1
 
Upvote 0
Solution
how about
=SEQUENCE(B1-A1,1,A1)
I maybe missing what you need
where B1 is column with 2015 and A1 is column with A1

Book6
ABCD
1201020152010
22011
32012
42013
52014
Sheet2
Cell Formulas
RangeFormula
D1:D5D1=SEQUENCE(B1-A1,1,A1)
Dynamic array formulas.
 
Upvote 0
@etaf
I think that you need to amend your formula as =SEQUENCE(B1-A1+1,1,A1) to make sure you get 2015
 
Upvote 0
With Power Query

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Added Custom" = Table.AddColumn(Source, "Years", each {[Start]..[End]}),
    #"Expanded Years" = Table.ExpandListColumn(#"Added Custom", "Years"),
    #"Removed Other Columns" = Table.SelectColumns(#"Expanded Years",{"Years"})
in
    #"Removed Other Columns"

Book1
ABCD
1StartEndYears
2201020152010
32011
42012
52013
62014
72015
Sheet1
Thx, fixed my problem
 
Upvote 0

Forum statistics

Threads
1,215,268
Messages
6,123,972
Members
449,137
Latest member
yeti1016

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top