Highlighting a date range within a calendar

cloud2828

New Member
Joined
Jul 16, 2019
Messages
43
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:

=DATE(A1;B1;C1)
Above is the first date

=F3+1
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.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,223,948
Messages
6,175,569
Members
452,652
Latest member
eduedu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top