Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel - Concatenate Cells Between Two Values [duplicate]

I'm trying to get all the years in between (and including) two cells indicating the start year and the end year

Such that if 2018 is the start and 2022 is the year, I'm wanting to return 2018 2019 2020 2021 2022

Likewise if 2015 was the start and 2017 was the end, return 2015 2016 2017

What would be the best way to go about this?

enter image description here

like image 701
Phil Avatar asked Nov 19 '25 20:11

Phil


1 Answers

Using TEXTJOIN and SEQUENCE:

=TEXTJOIN(" ",,SEQUENCE(C5-C4+1,,C4))

enter image description here

like image 112
BigBen Avatar answered Nov 21 '25 16:11

BigBen