Reputation: 27
I have the following layout in a data set:
I would like to have a formula which would print a list of the years from the start year to the end year in column B?
Any ideas on a formula that would achieve this ?
Thanks
Upvotes: 0
Views: 339
Reputation: 605
Try this: Excel 365
=TEXTJOIN(", ",TRUE,SEQUENCE(1,C2-A2+1,A2))
working for me.
Upvotes: 1
Reputation: 2551
You will need Office 365 for this, but then you could use:
=TEXTJOIN(",",TRUE,A2+SEQUENCE(A2-C2-1))
After seeing your comment, you would have to use:
=TEXTJOIN(",",TRUE,A2+SEQUENCE(A2-C2+1)-1)
Upvotes: 1