Trendline

%3CLINGO-SUB%20id%3D%22lingo-sub-3082996%22%20slang%3D%22en-US%22%3ETrendline%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3082996%22%20slang%3D%22en-US%22%3EHello!%20I%20am%20trying%20to%20add%20a%20trendline%20to%20a%20histogram%20in%20Excel%20for%20Mac.%20I%E2%80%99ve%20looked%20at%20every%20tutorial%2C%20and%20I%20just%20don%E2%80%99t%20have%20the%20options%20that%20people%20are%20using%20in%20them.%20When%20I%20go%20to%20Chart%20Design%2C%20Add%20Chart%20Element%2C%20there%20is%20no%20Trendline%20option%20(not%20grayed%20out%20it%20just%20doesn%E2%80%99t%20exist).%20Could%20someone%20please%20help%3F%20Thanks%20in%20advance!%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3082996%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3083575%22%20slang%3D%22en-US%22%3ERe%3A%20Trendline%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3083575%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1290436%22%20target%3D%22_blank%22%3E%40Kendrahmilton%3C%2FA%3E%26nbsp%3B%20....%20Hopefully%2C%20someone%20who%20uses%20Excel%20for%20Mac%20will%20respond.%26nbsp%3B%20Sorry%2C%20that's%20not%20me.%26nbsp%3B%20But%20in%20Excel%202010%20for%20Windows%2C%20I%20find%20the%20Trendline%20option%20under%20Layout%2C%20not%20Design.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22JoeUser_0-1643410096247.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F343480i7F40F6946BB86BBF%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22JoeUser_0-1643410096247.png%22%20alt%3D%22JoeUser_0-1643410096247.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3084654%22%20slang%3D%22en-US%22%3ERe%3A%20Trendline%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3084654%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1290436%22%20target%3D%22_blank%22%3E%40Kendrahmilton%3C%2FA%3E%26nbsp%3BAs%20for%20as%20I%20know%20you%20can%20%3CSTRONG%3Enot%3C%2FSTRONG%3E%20add%20a%20trend%20line%20to%20a%20%3CU%3Ehistogram%3C%2FU%3E.%20And%20that's%20the%20same%20for%20Mac%20and%20PC.%20Checked%20it%20on%20both%20platforms%20I%20suspect%20that%20you%20have%20been%20looking%20at%20videos%20where%20regular%20column%20charts%20were%20made%20that%20look%20like%20histograms.%20See%20picture%20below.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202022-01-29%20at%2006.51.43.png%22%20style%3D%22width%3A%20600px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F343520iE40BFA1F3C356955%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202022-01-29%20at%2006.51.43.png%22%20alt%3D%22Screenshot%202022-01-29%20at%2006.51.43.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EWhen%20you%20right-click%20on%20the%20data%20series%20in%20a%20real%20histogram%20you%20will%20see%20the%20%3CSTRONG%3EAdd%20Trendline...%3C%2FSTRONG%3E%20option%20greyed%20out.%20But%20when%20you%20go%20via%20the%20%3CEM%3EAdd%20Chart%20Element%3C%2FEM%3E%20icon%20it's%20indeed%20not%20there%2C%20which%20makes%20sense.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202022-01-29%20at%2006.59.13.png%22%20style%3D%22width%3A%20253px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F343521iF7CC977613E91038%2Fimage-dimensions%2F253x258%3Fv%3Dv2%22%20width%3D%22253%22%20height%3D%22258%22%20role%3D%22button%22%20title%3D%22Screenshot%202022-01-29%20at%2006.59.13.png%22%20alt%3D%22Screenshot%202022-01-29%20at%2006.59.13.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3084860%22%20slang%3D%22en-US%22%3ERe%3A%20Trendline%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3084860%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%20wrote%3A%20%60%60As%20for%20as%20I%20know%20you%20can%20not%20add%20a%20trend%20line%20to%20a%20histogram.%20%5B....%5D%20I%20suspect%20that%20you%20have%20been%20looking%20at%20%5B...%5D%20regular%20column%20charts%20were%20made%20that%20look%20like%20histograms%60%60%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat%20seems%20to%20be%20a%20distinction%20without%20a%20difference.%26nbsp%3B%20Or%20I%20don't%20understand%20your%20terminology.%26nbsp%3B%20Or%20perhaps%20it%20is%20a%20limitation%20(!)%20of%20your%20version%20(and%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1290436%22%20target%3D%22_blank%22%3E%40Kendrahmilton%3C%2FA%3E's%20%3F)%20of%20Excel.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFirst%2C%20according%20to%20the%20MSFT%20help%20page%20%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Fcreate-a-histogram-85680173-064b-4024-b39d-80f17ff2f4e8%23OfficeVersion%3DWindows%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%22Create%20a%20histogram%22%3C%2FA%3E%3A%26nbsp%3B%20%60%60%3CFONT%20color%3D%22%23DF0000%22%3EA%20histogram%20is%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23DF0000%22%3Ea%20column%20chart%3C%2FFONT%3E%20that%20shows%20frequency%20data.%60%60%26nbsp%3B%20There%20is%20no%20difference%2C%20AFAIK.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20will%20demonstrate%20that%20below.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20you%20are%20correct%3A%26nbsp%3B%20__I__%20created%20a%20Column%20Chart%20directly%20from%20the%20frequency%20data.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20following%20creates%20the%20%22histogram%22%20chart%20using%20the%20Data%20Analysis%20tool%20--%20if%20that%20is%20the%20distinction%20that%20you%20are%20trying%20to%20make.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E(Note%3A%20I%20am%20not%20adept%20at%20using%20the%20Data%20Analysis%20tool.%26nbsp%3B%20I%20usually%20do%20all%20this%20myself%20%22manually%22.%26nbsp%3B%20So%20I%20make%20a%20few%20%22adjustments%22%20to%20the%20DA%20Histogram%20results%20in%20order%20to%20get%20the%20results%20that%20I%20want%20for%20presentation%20purposes.%26nbsp%3B%20I'm%20sure%20there%20is%20a%20better%20way.)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1.%20I%20enter%2010%201s%2C%2020%202s%2C%2030%203s%2C%2040%204s%20and%2050%205s%20into%20A1%3AA150%20(my%20data).%3C%2FP%3E%3CP%3E2.%20I%20enter%201%2C%202%2C%203%2C%204%20and%205%20into%20B1%3AB5%20(my%20bin%20identifiers).%3C%2FP%3E%3CP%3E3.%20On%20the%20Excel%20%22ribbon%22%2C%20I%20click%20Data%20%26gt%3B%20Data%20Analysis%20%26gt%3B%20Histogram%20and%20fill%20in%20the%20dialog%20box%20as%20shown.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22JoeUser_0-1643443172376.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F343523iBC1E82E2F8F59E15%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22JoeUser_0-1643443172376.png%22%20alt%3D%22JoeUser_0-1643443172376.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E4.%20After%20I%20click%20OK%20and%20make%20a%20few%20%22adjustments%22%20(hacks%20!)%2C%20the%20result%20is%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22JoeUser_5-1643444550022.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F343529i7017D097F2770022%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22JoeUser_5-1643444550022.png%22%20alt%3D%22JoeUser_5-1643444550022.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENote%20the%20Chart%20Type%20--%20Column%20--%20after%20I%20right-click%20the%20series%20(one%20column%20in%20the%20chart)%20and%20click%20Change%20Series%20Chart%20Type.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E5.%20When%20I%20right-click%20the%20series%20(one%20column%20in%20the%20chart)%2C%20I%20get%20the%20following%20menu%2C%20which%20includes%20the%20Add%20Trendline%20option.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22JoeUser_2-1643443985346.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F343525iF9D89BC7F586359D%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22JoeUser_2-1643443985346.png%22%20alt%3D%22JoeUser_2-1643443985346.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E6.%20When%20I%20click%20Add%20Trendline%20and%20make%20a%20few%20%22adjustments%22%2C%20the%20result%20is%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22JoeUser_6-1643445016820.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F343532i822B6344C345F73A%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22JoeUser_6-1643445016820.png%22%20alt%3D%22JoeUser_6-1643445016820.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%2C%20do%20you%20see%20anything%20%22wrong%22%20(for%20the%20purposes%20of%20this%20discussion)%20with%20what%20I%20am%20doing%3F%26nbsp%3B%20Can%20you%20do%20the%20same%20thing%20in%20your%20version%20of%20Excel%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMore%20to%20the%20point%2C%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1290436%22%20target%3D%22_blank%22%3E%40Kendrahmilton%3C%2FA%3E%20%2C%20can%20__you__%20do%20the%20same%20thing%20in%20your%20version%20of%20Excel%20--%20making%20adjustments%20for%20differences%20in%20the%20user%20interfaces%20between%20versions%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20again%2C%20there%20is%20no%20need%20to%20use%20the%20Data%20Analysis%20Histogram%20feature.%26nbsp%3B%20You%20can%20just%20the%20Insert%20%26gt%3B%20Charts%20%26gt%3B%20Column%20feature%20(or%20the%20equivalent%20in%20your%20version%20of%20Excel).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor
Hello! I am trying to add a trendline to a histogram in Excel for Mac. I’ve looked at every tutorial, and I just don’t have the options that people are using in them. When I go to Chart Design, Add Chart Element, there is no Trendline option (not grayed out it just doesn’t exist). Could someone please help? Thanks in advance!
6 Replies

@Kendrahmilton  .... Hopefully, someone who uses Excel for Mac will respond.  Sorry, that's not me.  But in Excel 2010 for Windows, I find the Trendline option under Layout, not Design.

 

JoeUser_0-1643410096247.png

 

@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.

Screenshot 2022-01-29 at 06.51.43.png

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.

Screenshot 2022-01-29 at 06.59.13.png

@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.

 

JoeUser_0-1643443172376.png

 

4. After I click OK and make a few "adjustments" (hacks !), the result is:

 

JoeUser_5-1643444550022.png

 

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.

 

JoeUser_2-1643443985346.png

 

6. When I click Add Trendline and make a few "adjustments", the result is:

 

JoeUser_6-1643445016820.png

 

@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).

 

@Joe User ????

@Kendrahmilton 

 

I demonstrated how __I__ am able to add a (linear) trendline to a histogram (aka Column) chart.

 

But I should have noted that even if that "works" for you (i.e. you can add a trendline now), often the trendline is not what you intended, except for XY Scatter charts.

 

Consider the following example:

 

JoeUser_0-1643451152262.png

 

The "y" equation for the linear trendline in the Scatter chart on top is correct, because that is, in fact, the formula in column B.

 

The "y" equation for the linear trendline in the Column chart on the bottom is incorrect.  The reason is:  regardless of the labels that we use in the x-axis (they might not even be numeric), the treadline assumes that the "x" values ("independent variable") are 1, 2, 3 etc.

 

So a trendline for a histogram (Column) chart is valid only if the labels for your histogram columns are 1, 2, 3 etc, by coincidence.

 

To demonstrate, if we change the "x" values to 1, 2, 3 etc, the result is:

 

JoeUser_0-1643452429040.png

 

@Joe User Not sure what Excel version you are using, but as from 2016, Excel (both Mac and PC) contains a Histogram chart type that takes a single column of values from which the frequency of those values is determined and displayed in customizable bins/columns. And when you use this particular chart type you can NOT add a trendline, as it would be meaningless.

Riny_van_Eekelen_0-1643455172521.png