I have excel like this, I would like to concat the Static Column with range of year with given start year and end year like below:
Make | Model | Start Year | End Year | CONCAT RESULT |
---|---|---|---|---|
Toyota | Camry | 2005 | 2008 | Toyota Camry 2005,Toyota Camry 2006,Toyota Camry 2007,Toyota Camry 2008 |
Honda | Civic | 2007 | 2008 | Honda Civic 2007,Honda Civic 2008 |
Please help
CodePudding user response:
Using TEXTJOIN and SEQUENCE:
=TEXTJOIN(", ",,A2&" "&B2&" "&SEQUENCE(D2-C2 1,,C2))
CodePudding user response:
For older version from 2019:
=TEXTJOIN(",",,A2&" "&B2&" "&ROW(INDIRECT(C2&":"&D2)))
array formula to confirm with CTRL SHIFT ENTER, bye.