Data coming from a pivot table is being copied to a new page, my overall goal is to condense the years as follows into a single cell. There can be anywhere from 1-15+ years before the next blank cell and they are not always consecutive years. Editing the same column is prefered but if it is easier in a new column that is fine also.
Cells are in General Format NOT Date (if that matters)
So basicly:
In a given range, (e.g. column in table, D2:D583)
Is cell blank?
n=count(cells between current blank and next blank)
if n=1, cell=R[1]C
if n>1, cell=R[1]C&"-"&R[n]C
if n=0, end (would have ran off of table at this point)
Year.png
Deleting the individual years is not required, they can remain in the column as the entire row gets deleted in a later step of my macro
Bookmarks