I have a calculation worksheet with live formulas that contains data with column headings titled 2020-2028 (9 columns) (B2:J2). 1 year per column.
On an input sheet, I have START and END dates in two different cells (A1,A2)
With that said, I would like a VBA macro that is able to look at the START and END dates on the input sheet, and based on their location in the year range defined by (A1,A2), delete the columns that are out of range on the calculation sheet.
Theoretically, only year columns within the START and END year range will be left on my calculation sheet.
For example: If i had 2022 as my start date and 2024 as my end date, I would expect the macro to delete columns 2020-2021 and 2025-2028.
Any feedback or further direction is greatly appreciated.