Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBa code for index(linest)
hi everyone
i m trying to write vba code to get coeefiecints of second order polynomial eequation Equation: y = (c2 * x^2) + (c1 * x ^1) + b c2: =INDEX(LINEST(y,x^{1,2}),1) C1: =INDEX(LINEST(y,x^{1,2}),1,2) b = =INDEX(LINEST(y,x^{1,2}),1,3) ihave recorded macro Cells(j + 2, "D").Select ActiveCell.FormulaR1C1 = _ "=INDEX(LINEST(RC[-2]:R[2]C[-2],RC[-3]:R[2]C[-3]^{1,2}),1)" Cells(j + 2, "E").Select ActiveCell.FormulaR1C1 = _ "=INDEX(LINEST(RC[-3]:R[2]C[-3],RC[-4]:R[2]C[-4]^{1,2}),1,2)" Cells(j + 2, "F").Select ActiveCell.FormulaR1C1 = _ "=INDEX(LINEST(RC[-4]:R[2]C[-4],RC[-5]:R[2]C[-5]^{1,2}),1,3)" but now trying to write VBA CODE for NROWS,NCOLUMNNS] i hop i wil get direction from this group many thanks in advance 4 ur efrts n time |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Color Index Code, is there any thing like that? | New Users to Excel | |||
Getting & Using Sheet Names or Index in VBA code | New Users to Excel | |||
Offset code for dynamic row# & multiple columns in LINEST function | Excel Worksheet Functions | |||
Using INDIRECT in INDEX(LINEST.. ) function | Excel Worksheet Functions | |||
How do I refer (in VBA Code) to a column by caption instead of index ? | Excel Programming |