Hi every one
I want to make sheet like "result" in attached file with columns : xutm , yutm ,and slope of trend line.i found trend line with scatter chart before in every sheets so just need to choose coefficient of x in equation for every coordinate
so please help me with macro code because i have many sheets
thank you so much
Hi,
Do you need the VBA to create the chart and trend line, or just get the x coefficient from the trend line on each sheet?
Regards
Phil
hi again
from yesterday7 hours later up to now i have understood that i can find slope with this
=SLOPE(INDIRECT("'"&A2&"'!R2:R19"),INDIRECT("'"&A2&"'!Q2:Q19"))
so: A2=sheet name=utmx
in cell B2 i have to put utmy
and C2=SLOPE(INDIRECT("'"&A2&"'!R2:R19"),INDIRECT("'"&A2&"'!Q2:Q19")) in result sheet
but how can i get (utm x=G2=sheet name) and (utm y=H2) from all sheets and put them in to result sheet
so then i will have result sheet with all coordinate point(x utm-y utm ) with their slope data line (in 3 columns)
i hope i could explain well, forgive me for my weak English language
i look forward to hearing from you
thank you very much
Hi,
The syntax for SLOPE is =SLOPE(known_ys, known_xs) so you can just get the slope from, for example, sheet 44947 using =SLOPE('449447'!R2:R19,'449447'!Q2:Q19)
Just repeat for all sheets - see attached.
regards
Phil