Highlighting a date range within a calendar


New Member
Jul 16, 2019
I have this automatic calendar that goes from January 1st 2019 to January 31st, I am required to create a VBA code or otherwise to select a date range at any point in this calendar so that it can be copied and placed into another sheet, I already have a macro that I can use to copy it to another sheet once it's selected. The issue I'm having is that I can't figure out how to select a range given how my calendar is done:

Above is the first date

Above is the remaining dates, going from "=F3+1", =G3+1", "=H3+1" etc.

The way I'm thinking, is that I have to create an IF statement for each individual date, but that is obviously too much, does anyone have any ideas on how I can select a range of values? It starts at Row 34 and ends at Row 81 if that's information someone may need. The columns would be dynamic since the calendar runs horizontally across the excel sheet.

Some videos you may like

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Watch MrExcel Video

Forum statistics

Latest member
kayalvizhi kandhan

This Week's Hot Topics