Hi everyone,

I looked everywhere to find out how to do this in VBA. Any help would be appreciated.

Basically in summary I have a VBA UserForm that populates a chart and puts it in an image frame. I set the range of dates from A2 until the end of the column | for example Range("A2", Range("A2").End(xlUp)) |. This works great for a complete graph of ALL the dates of the values. Now I want to be able to show only the last 12 days as the whole range goes back a couple of years. What I am trying to figure out is how to only select the last 12 Dates and Values, using this Range method to first find the end of the column and then select that cell plus the 11 before it (Up).

Here is an example:

A
Date
29 Dec 20
30 Dec 20
31 Dec 20
01 Jan 21
02 Jan 21
03 Jan 21
04 Jan 21
05 Jan 21
06 Jan 21
07 Jan 21
08 Jan 21
09 Jan 21
10 Jan 21
11 Jan 21
12 Jan 21
13 Jan 21
14 Jan 21
15 Jan 21
16 Jan 21
17 Jan 21
18 Jan 21
19 Jan 21
20 Jan 21
21 Jan 21


So, is there a way where I can simply do something like "Range("A2",Range("A2").End(xlUp) - 12"

Please help, thanks!

Phil