To create a trendline for only a specific part of your data in an Excel XY line chart, you can follow these steps:
- Select the data points that you want to include in the trendline. You can do this by clicking on the first data point, holding down the Shift key, and then clicking on the last data point.
- Right-click on one of the selected data points and choose "Add Trendline" from the context menu.
- In the "Format Trendline" pane that appears on the right side of the screen, choose the type of trendline that you want to use (e.g. linear, exponential, etc.).
- Under the "Series Options" section, select the "X Value" dropdown and choose "Values in reverse order" to ensure that the trendline is plotted correctly.
- Under the "Series Options" section, select the "Name" dropdown and give your trendline a descriptive name.
- Under the "Series Options" section, select the "Plot Series On" dropdown and choose "Secondary Axis".
- Under the "Axis Options" section, select the "Secondary Vertical Axis" dropdown and choose "Show".
- Under the "Axis Options" section, select the "Minimum" and "Maximum" dropdowns and set the values to match the time period that you want to include in the trendline.
- Adjust the formatting of your trendline as desired, such as changing the color or thickness.
Your trendline should now be plotted for only the specific part of your data that you selected.