how to get the Y Axis to cross at "Today's Date" i

cathyo

New Member
Joined
Jan 19, 2003
Messages
48
I'm sorry - I'm under a time constraint and didn't spend much time searching for an answer...thus, I could use help as soon as possible.

I'm creating a chart where the X axis are dates, everyday -- past 3 weeks months as well as the next 3 weeks. The data plotted to the left of "today" is actual data, whereas the data plotted to the right is estimated data.

I create a vertical line on the graph to indicate where "today" is (double click on X axis, format axis window appears, go to scale index and change the date in the "Value (Y) axis crosses at"

I added a button with a macro assigned to it that will refresh the data and update the chart -- I recorded a macro that changes the date but the code shows "09/28/2006" in the code and I'd like to change the code so it's enters today's date. Can anyone help? Thank You!
 

Some videos you may like

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Jon Peltier

MrExcel MVP
Joined
May 14, 2003
Messages
4,922
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Code:
    With ActiveChart.Axes(xlCategory)
        .CrossesAt = Now
    End With
 

Watch MrExcel Video

Forum statistics

Threads
1,114,093
Messages
5,545,919
Members
410,712
Latest member
jhgeorge
Top