It has been a while since I did any Excel work and I am having a bit of trouble remembering how I did this sort of thing in the past.
I have sheet of data for motorcycle Year, Make, and Model and I would like to combine the years in a second sheet as a date range where Make and Model are the same. Basically transform the data as follows:
Source data (Sheet1):
| Year | Make | Model |
|---|---|---|
| 2003 | Yamaha | FZS 1 |
| 2004 | Yamaha | FZS 1 |
| 2005 | Yamaha | FZS 1 |
| 2018 | Yamaha | MT-07 |
| 2019 | Yamaha | MT-07 |
| 2020 | Yamaha | MT-07 |
Resulting data (Sheet2):
| Year Range | Make | Model |
|---|---|---|
| 2003-2005 | Yamaha | FZS 1 |
| 2018-2020 | Yamaha | MT-07 |
I am having trouble determining how to combine the Year column into a year range when columns B and C are equal for all the adjacent rows.