Write a simple Excel VBA macro code to get a list of year ranges, from a list of years
$2 USD / hour
In Progress
Posted about 9 years ago
$2 USD / hour
** $5 ** I need an Excel VBA macro code to get a list of year ranges, from a list of years. I have an excel spreadsheet that has a column containing a list of years that the car parts fit. As an example, there is a single cell containing the following data:
2006, 2005, 2004, 2003, 2002, 2001, 1999, 1998, 1995, 1993, 1992, 1991, 1990, 1989, 1988, 1987
I want to combine the years into a list of ranges, like the following:
2006-2001, 1999-1998, 1995, 1993-1987