hamadsultan
New Member
- Joined
- Jan 23, 2011
- Messages
- 49
Hi Experts;
History:
I have a work book that contains 9 number of sheets but two are very important and i use excell 2007 to open it. I found some user defind function in a module which use in the Main worksheet. One of function i posted here also along with the how the programmer use in formula bar.
First code is here
Now the programmer use it as;
Now I want to undestand the following :
1.ANSLOW and ANSHIGH is used in Dinterp2 function it dfines here and use here i search all the sheets in that workbook they are only in this method. What value it used and where the values come here?
2.The code i copy from the formula bar u see INdirect(J71) and (J72) its Strings come from as J71=J70&"PWR" and same in J72.
But in the function of DINTERP2 its assign TXLOW and TYLow. When SINTRP2 call it used as TX and TY if u see programmer used TX(1) what it means?
Please help me to understand this code.
I pray to God help all the guys who help me always.
Regards
History:
I have a work book that contains 9 number of sheets but two are very important and i use excell 2007 to open it. I found some user defind function in a module which use in the Main worksheet. One of function i posted here also along with the how the programmer use in formula bar.
First code is here
Code:
Function DINTERP2(TAMB, TAMBLOW, TAMBHIGH, PWR, NX, NY, [COLOR=red]TXLOW, TYLOW[/COLOR], TXHIGH, TYHIGH, NFNC)
Call SINTRP2(PWR, ANSLOW, NX, NY, TXLOW, TYLOW, NFNC, 1)
Call SINTRP2(PWR, ANSHIGH, NX, NY, TXHIGH, TYHIGH, NFNC, 1)
DINTERP2 = ANSLOW + ((TAMB - TAMBLOW) / (TAMBHIGH - TAMBLOW)) * ([COLOR=red]ANSHIGH - ANSLOW[/COLOR])
End Function
Sub SINTRP2(XN, ANS, NX, NY, TX, TY, NFNC, NDEG)
NNDEG = NDEG
If (NX > NDEG) Then GoTo LABLE2
MsgBox "TABLE TOO SMALL FOR DESIRED DEGREE OF FIT"
GoTo LABLEEND
LABLE2:
If ([COLOR=red]XN < TX(1))[/COLOR] Then GoTo LABLE10
If (XN > TX(NX)) Then GoTo LABLE20
GoTo LABLE30
Code:
=IF(C$13+DATA!F5=0,SINTERP2(E$109,81,11,FLTAMB,OPTDATA,9,1),DINTERP2(E$109,J$69,J$73,E$52,20,9,INDIRECT(J$71),INDIRECT(J$72),INDIRECT(J$75),INDIRECT(J$76),4))*F34
1.ANSLOW and ANSHIGH is used in Dinterp2 function it dfines here and use here i search all the sheets in that workbook they are only in this method. What value it used and where the values come here?
2.The code i copy from the formula bar u see INdirect(J71) and (J72) its Strings come from as J71=J70&"PWR" and same in J72.
But in the function of DINTERP2 its assign TXLOW and TYLow. When SINTRP2 call it used as TX and TY if u see programmer used TX(1) what it means?
Please help me to understand this code.
I pray to God help all the guys who help me always.
Regards