how to plot a line graph with dates on the X axis

Anonymous
2023-10-02T13:30:08+00:00

I have a sheet with column K is a dollar amount (range about $1,200,000 to $1,600,000), column L is a dollar amount (range about $350.00 to $900.00) and column U is the dates that correspond to the two dollar amounts. I am trying to graph the two dollar amounts over time. It would be great if both lines could be on the same graph, which would involve having 2 different labels on the Y axis, but I've seen that in real life (not excel but in my business practice) before, so I'm assuming it is doable. But even if I have to have the two lines on two different graphs, ok so be it. But first thing I discovered is that when I select column K data, column L data, and column U data, what I get on the inserted line graph is columns K, L and M. I suggest that is a BUG that it will only allow adjacent columns in the graph. But whatever I moved the columns so now column M has the dates I need and not column U.

Anyway, so now the graph has the 3 components, but they are all along the bottom X axis versus dollars on the Y and dates on the X. How can I get the graph to show what I'm trying to display?

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-10-02T13:55:52+00:00

    To plot a line graph with dates on the X axis, you can follow these steps:

    1. Select the data range that you want to include in the chart, including the dates and the two dollar amounts.
    2. Click on the "Insert" tab in the ribbon.
    3. Click on the "Line" chart type and select the subtype that you prefer.
    4. The chart will be inserted into the worksheet. Right-click on the chart and select "Select Data".
    5. In the "Select Data Source" dialog box, click on the "Edit" button under "Horizontal (Category) Axis Labels". (Column U)
    6. In the "Axis Labels" dialog box, select the range of dates that you want to use for the X axis labels.
    7. Click "OK" to close all the dialog boxes.
    8. You should now have a line chart with the dates on the X axis and the two dollar amounts on the Y axis. If you want to have both lines on the same chart, you can add a secondary Y axis by right-clicking on one of the data series and selecting "Format Data Series". In the "Series Options" tab, select "Secondary Axis" under "Plot Series On".

    21 people found this answer helpful.
    0 comments No comments