PJGallagher
New Member
- Joined
- Jul 8, 2016
- Messages
- 2
Hi all,
Newbie here...
I have a spreadsheet file containing two sheets (Sheet1 & Sheet2).
Sheet2 is populated with some raw data pulled in from a .CSV file daily. The data range grows in size over time, daily stats for my work.
I produce a dashboard (Sheet1) showing 3 different charts that each point to specific data in Sheet2.
The charts auto populate daily (VBA runs when user clicks a button) showing data up to the latest entry in Sheet2.
PROBLEM: The issue is the X Axis on the charts changes from the default of 1 to a large number which seems to relate to the number of rows being referenced. So, the real dates are not displayed on the X Axis, just the first date and no more dates.
If I manually change the chart X Axis Major Unit to 1 (or click reset on the chart formating) the correct dates are shown on X Axis.
QUESTION: How can I set the X Axis Major Unit to 1 month in VBA? I have 3 charts on Sheet1 that I need to make this work for...
Many thanks in advance
Paul G
Newbie here...
I have a spreadsheet file containing two sheets (Sheet1 & Sheet2).
Sheet2 is populated with some raw data pulled in from a .CSV file daily. The data range grows in size over time, daily stats for my work.
I produce a dashboard (Sheet1) showing 3 different charts that each point to specific data in Sheet2.
The charts auto populate daily (VBA runs when user clicks a button) showing data up to the latest entry in Sheet2.
PROBLEM: The issue is the X Axis on the charts changes from the default of 1 to a large number which seems to relate to the number of rows being referenced. So, the real dates are not displayed on the X Axis, just the first date and no more dates.
If I manually change the chart X Axis Major Unit to 1 (or click reset on the chart formating) the correct dates are shown on X Axis.
QUESTION: How can I set the X Axis Major Unit to 1 month in VBA? I have 3 charts on Sheet1 that I need to make this work for...
Many thanks in advance
Paul G