Can you specify the number of decimal places you want? Or does that change and if so can you specify the conditions that will give specific decimal places?
Thanks, David On Sat, Feb 24, 2018 at 3:32 PM, <excel-macros@googlegroups.com> wrote: > excel-macros@googlegroups.com > <https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/excel-macros/topics> > Google > Groups > <https://groups.google.com/forum/?utm_source=digest&utm_medium=email/#!overview> > <https://groups.google.com/forum/?utm_source=digest&utm_medium=email/#!overview> > Topic digest > View all topics > <https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/excel-macros/topics> > > - How to paste trendline equation from graph into a cell > <#m_931967116473658755_group_thread_0> - 1 Update > - Formatting Output of Numbers for Printing to File > <#m_931967116473658755_group_thread_1> - 1 Update > > How to paste trendline equation from graph into a cell > <http://groups.google.com/group/excel-macros/t/267459056f6413b5?utm_source=digest&utm_medium=email> > 3xst...@gmail.com: Feb 24 12:00PM -0800 > > Marek, > > The trendline equation is in a DataLabel object and you can get access to > that text and insert it in a cell. > So a quick and dirty way to do this is: > > Private Sub Test() > > > ActiveSheet.ChartObjects("Chart 1").Activate > > Cells(1, 1) = ActiveChart.FullSeriesCollection(1).Trendlines(1). > DataLabel.Text > > > End Sub > > Note that this assumes you have only one chart in the worksheet. If you > have more, you'll have to figure out which one it is. > > -Jim > > On Friday, February 23, 2018 at 2:14:22 AM UTC-5, Marek Adamech wrote: > Back to top <#m_931967116473658755_digest_top> > Formatting Output of Numbers for Printing to File > <http://groups.google.com/group/excel-macros/t/3425e8b07766a491?utm_source=digest&utm_medium=email> > 3xst...@gmail.com: Feb 24 11:29AM -0800 > > Hi all, > > This may be an easy one and I'm just not understanding formatting... > > I have calculations which give numbers like: > > 0.037999999 > 9.899999619 > 4.900000005 > 0.018999999 > 0.349999994 > > I'll be printing (or writing) data to a file using vba > But the numbers I want are: > > 0.038 > 9.9 > 4.9 > 0.019 > 0.35 > > Is there an obvious way to do this? I note when the numbers are in columns > then the values I want show properly unless I widen the column. So Excel > is doing some internal formatting in that case. > > Thanks in advance! > -Jim > Back to top <#m_931967116473658755_digest_top> > You received this digest because you're subscribed to updates for this > group. You can change your settings on the group membership page > <https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/excel-macros/join> > . > To unsubscribe from this group and stop receiving emails from it send an > email to excel-macros+unsubscr...@googlegroups.com. > -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at https://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout.