Forum Discussion
Trendline
Kendrahmilton As for as I know you can not add a trend line to a histogram. And that's the same for Mac and PC. Checked it on both platforms I suspect that you have been looking at videos where regular column charts were made that look like histograms. See picture below.
When you right-click on the data series in a real histogram you will see the Add Trendline... option greyed out. But when you go via the Add Chart Element icon it's indeed not there, which makes sense.
Riny_van_Eekelen wrote: ``As for as I know you can not add a trend line to a histogram. [....] I suspect that you have been looking at [...] regular column charts were made that look like histograms``
That seems to be a distinction without a difference. Or I don't understand your terminology. Or perhaps it is a limitation (!) of your version (and Kendrahmilton's ?) of Excel.
First, according to the MSFT help page "Create a histogram": ``A histogram is a column chart that shows frequency data.`` There is no difference, AFAIK.
I will demonstrate that below.
But you are correct: __I__ created a Column Chart directly from the frequency data.
The following creates the "histogram" chart using the Data Analysis tool -- if that is the distinction that you are trying to make.
(Note: I am not adept at using the Data Analysis tool. I usually do all this myself "manually". So I make a few "adjustments" to the DA Histogram results in order to get the results that I want for presentation purposes. I'm sure there is a better way.)
1. I enter 10 1s, 20 2s, 30 3s, 40 4s and 50 5s into A1:A150 (my data).
2. I enter 1, 2, 3, 4 and 5 into B1:B5 (my bin identifiers).
3. On the Excel "ribbon", I click Data > Data Analysis > Histogram and fill in the dialog box as shown.
4. After I click OK and make a few "adjustments" (hacks !), the result is:
Note the Chart Type -- Column -- after I right-click the series (one column in the chart) and click Change Series Chart Type.
5. When I right-click the series (one column in the chart), I get the following menu, which includes the Add Trendline option.
6. When I click Add Trendline and make a few "adjustments", the result is:
Riny_van_Eekelen, do you see anything "wrong" (for the purposes of this discussion) with what I am doing? Can you do the same thing in your version of Excel?
More to the point, Kendrahmilton , can __you__ do the same thing in your version of Excel -- making adjustments for differences in the user interfaces between versions?
And again, there is no need to use the Data Analysis Histogram feature. You can just the Insert > Charts > Column feature (or the equivalent in your version of Excel).
- Riny_van_EekelenJan 29, 2022Platinum Contributor
JoeUser2004 ????