close

how can i interpolate if the given values a

WIND ANGLE Q(DEG) CACSCM00.003970.000000.000000
100.00394-0.00012-0.000065
200.00369-0.00013-0.000097
300.00398-0.00008-0.000108
400.004080.00002-0.000137
500.004260.00023-0.000177
600.004220.00062-0.000223
700.003500.00117-0.000020
800.001950.000970.000256
90-0.000030.000880.000336
100-0.001030.000980.000338
110-0.001180.001060.000343
120-0.001170.001170.000366
130-0.001200.001200.000374
140-0.001470.001140.000338
150-0.001980.001000.000278
160-0.002220.000750.000214
170-0.002420.000370.000130
180-0.002700.000000.000000
190-0.00242-0.00037-0.000130
200-0.00222-0.00075-0.000214
210-0.00198-0.00100-0.000278
220-0.00147-0.00114-0.000338
230-0.00120-0.00120-0.000374
240-0.00117-0.00117-0.000366
250-0.00118-0.00106-0.000343
260-0.00103-0.00098-0.000338
270-0.00003-0.00088-0.000336
2800.00195-0.00097-0.000256
2900.00350-0.001170.000020
3000.00422-0.000620.000223
3100.00426-0.000230.000177
3200.00408-0.000020.000137
3300.003980.000080.000108
3400.003960.000130.000097
3500.003940.000120.000065

Angle of WindCACSCM

121.66-0.0011750.0011750.000367IF I TYPE 121.66 I WANT THE EXCELL TO LOOK UP THE VALUE FROM THE EQUIVALENT
VALUE OF CA CS CM..

THANK YOU.. HOPE YOU COULD HELP ME..i put your table in cells a3:d38 and your desired wind angle in cell a41

in cell a43
=OFFSET($A$2,MATCH($A$41,$A$3:$A$38,1),0)

and in cell a44
=OFFSET($A$2,MATCH($A$41,$A$3:$A$38,1) 1,0)

this gives the wind angles below and above you desired wind angle

in cells b43 and copied thru d44
=VLOOKUP($A43,$A$3:$D$38,COLUMN())

in cell b41 copied thru d41

=($A$41-$A$43)/($A$44-$A$43)*(B44-B43) B43

quot;teenquot; wrote:

gt; how can i interpolate if the given values a
gt;
gt; WIND ANGLE Q(DEG) CACSCM
gt;
gt;
gt; 00.003970.000000.000000
gt; 100.00394-0.00012-0.000065
gt; 200.00369-0.00013-0.000097
gt; 300.00398-0.00008-0.000108
gt; 400.004080.00002-0.000137
gt; 500.004260.00023-0.000177
gt; 600.004220.00062-0.000223
gt; 700.003500.00117-0.000020
gt; 800.001950.000970.000256
gt; 90-0.000030.000880.000336
gt; 100-0.001030.000980.000338
gt; 110-0.001180.001060.000343
gt; 120-0.001170.001170.000366
gt; 130-0.001200.001200.000374
gt; 140-0.001470.001140.000338
gt; 150-0.001980.001000.000278
gt; 160-0.002220.000750.000214
gt; 170-0.002420.000370.000130
gt; 180-0.002700.000000.000000
gt; 190-0.00242-0.00037-0.000130
gt; 200-0.00222-0.00075-0.000214
gt; 210-0.00198-0.00100-0.000278
gt; 220-0.00147-0.00114-0.000338
gt; 230-0.00120-0.00120-0.000374
gt; 240-0.00117-0.00117-0.000366
gt; 250-0.00118-0.00106-0.000343
gt; 260-0.00103-0.00098-0.000338
gt; 270-0.00003-0.00088-0.000336
gt; 2800.00195-0.00097-0.000256
gt; 2900.00350-0.001170.000020
gt; 3000.00422-0.000620.000223
gt; 3100.00426-0.000230.000177
gt; 3200.00408-0.000020.000137
gt; 3300.003980.000080.000108
gt; 3400.003960.000130.000097
gt; 3500.003940.000120.000065
gt;
gt; Angle of WindCACSCM
gt;
gt; 121.66-0.0011750.0011750.000367
gt;
gt;
gt; IF I TYPE 121.66 I WANT THE EXCELL TO LOOK UP THE VALUE FROM THE EQUIVALENT
gt; VALUE OF CA CS CM..
gt;
gt; THANK YOU.. HOPE YOU COULD HELP ME..
gt;

You could also use this User Defined Function
You use it much the way you would use VLOOKUP(), but it interpolates
If you don't know how to insert a UDF, look here first:

www.mvps.org/dmcritchie/excel/getstarted.htm

' ================================================== =======================
Function TabInterpol(ToFind As Double, Table As Range, ColumnNo As Long)
' Niek Otten
' Works like Vlookup, but interpolates
' Numbers only!

Dim RowNrLow As Long
Dim RowNrHigh As Long
Dim TableEntryLow As Double
Dim TableEntryHigh As Double
Dim ToFindLow As Double
Dim ToFindHigh As Double
Dim i As Long
Dim a As Double
Dim VBATable

VBATable = Table ' read table into VBA for speed

If ToFind lt; VBATable(1, 1) Or ToFind gt; VBATable(UBound(VBATable, 1), 1) Then
TabInterpol = CVErr(xlErrNA)
Exit Function
End If

If ToFind = VBATable(1, 1) Then ' do not interpolate for bottom
TabInterpol = VBATable(1, ColumnNo)
Exit Function
End If

If ToFind = VBATable(UBound(VBATable), 1) Then ' do not interpolate for end
of table
TabInterpol = VBATable(UBound(VBATable, 1), ColumnNo)
Exit Function
End If

For i = 1 To Table.Rows.Count
a = VBATable(i, 1)
If a gt; ToFind Then
RowNrLow = i - 1
Exit For
End If
Next i

If ToFind = a Then
TabInterpol = VBATable(RowNrLow, ColumnNo)
Exit Function
End If

RowNrHigh = RowNrLow 1
TableEntryLow = VBATable(RowNrLow, ColumnNo)
TableEntryHigh = VBATable(RowNrHigh, ColumnNo)
ToFindLow = VBATable(RowNrLow, 1)
ToFindHigh = VBATable(RowNrHigh, 1)
TabInterpol = TableEntryLow (ToFind - ToFindLow) / (ToFindHigh -
ToFindLow) _
* (TableEntryHigh - TableEntryLow)

End Function
' ================================================== =======================--
Kind regards,

Niek Otten

quot;duanequot; gt; wrote in message
...
gt;i put your table in cells a3:d38 and your desired wind angle in cell a41
gt;
gt; in cell a43
gt; =OFFSET($A$2,MATCH($A$41,$A$3:$A$38,1),0)
gt;
gt; and in cell a44
gt; =OFFSET($A$2,MATCH($A$41,$A$3:$A$38,1) 1,0)
gt;
gt; this gives the wind angles below and above you desired wind angle
gt;
gt; in cells b43 and copied thru d44
gt; =VLOOKUP($A43,$A$3:$D$38,COLUMN())
gt;
gt; in cell b41 copied thru d41
gt;
gt; =($A$41-$A$43)/($A$44-$A$43)*(B44-B43) B43
gt;
gt;
gt;
gt;
gt; quot;teenquot; wrote:
gt;
gt;gt; how can i interpolate if the given values a
gt;gt;
gt;gt; WIND ANGLE Q(DEG) CA CS CM
gt;gt;
gt;gt;
gt;gt; 0 0.00397 0.00000 0.000000
gt;gt; 10 0.00394 -0.00012 -0.000065
gt;gt; 20 0.00369 -0.00013 -0.000097
gt;gt; 30 0.00398 -0.00008 -0.000108
gt;gt; 40 0.00408 0.00002 -0.000137
gt;gt; 50 0.00426 0.00023 -0.000177
gt;gt; 60 0.00422 0.00062 -0.000223
gt;gt; 70 0.00350 0.00117 -0.000020
gt;gt; 80 0.00195 0.00097 0.000256
gt;gt; 90 -0.00003 0.00088 0.000336
gt;gt; 100 -0.00103 0.00098 0.000338
gt;gt; 110 -0.00118 0.00106 0.000343
gt;gt; 120 -0.00117 0.00117 0.000366
gt;gt; 130 -0.00120 0.00120 0.000374
gt;gt; 140 -0.00147 0.00114 0.000338
gt;gt; 150 -0.00198 0.00100 0.000278
gt;gt; 160 -0.00222 0.00075 0.000214
gt;gt; 170 -0.00242 0.00037 0.000130
gt;gt; 180 -0.00270 0.00000 0.000000
gt;gt; 190 -0.00242 -0.00037 -0.000130
gt;gt; 200 -0.00222 -0.00075 -0.000214
gt;gt; 210 -0.00198 -0.00100 -0.000278
gt;gt; 220 -0.00147 -0.00114 -0.000338
gt;gt; 230 -0.00120 -0.00120 -0.000374
gt;gt; 240 -0.00117 -0.00117 -0.000366
gt;gt; 250 -0.00118 -0.00106 -0.000343
gt;gt; 260 -0.00103 -0.00098 -0.000338
gt;gt; 270 -0.00003 -0.00088 -0.000336
gt;gt; 280 0.00195 -0.00097 -0.000256
gt;gt; 290 0.00350 -0.00117 0.000020
gt;gt; 300 0.00422 -0.00062 0.000223
gt;gt; 310 0.00426 -0.00023 0.000177
gt;gt; 320 0.00408 -0.00002 0.000137
gt;gt; 330 0.00398 0.00008 0.000108
gt;gt; 340 0.00396 0.00013 0.000097
gt;gt; 350 0.00394 0.00012 0.000065
gt;gt;
gt;gt; Angle of Wind CA CS CM
gt;gt;
gt;gt; 121.66 -0.001175 0.001175 0.000367
gt;gt;
gt;gt;
gt;gt; IF I TYPE 121.66 I WANT THE EXCELL TO LOOK UP THE VALUE FROM THE
gt;gt; EQUIVALENT
gt;gt; VALUE OF CA CS CM..
gt;gt;
gt;gt; THANK YOU.. HOPE YOU COULD HELP ME..
gt;gt;
Be aware of some unintended line wraps

--
Kind regards,

Niek Otten

quot;Niek Ottenquot; gt; wrote in message
...
gt; You could also use this User Defined Function
gt; You use it much the way you would use VLOOKUP(), but it interpolates
gt; If you don't know how to insert a UDF, look here first:
gt;
gt; www.mvps.org/dmcritchie/excel/getstarted.htm
gt;
gt; '
gt; ================================================== =======================
gt; Function TabInterpol(ToFind As Double, Table As Range, ColumnNo As Long)
gt; ' Niek Otten
gt; ' Works like Vlookup, but interpolates
gt; ' Numbers only!
gt;
gt; Dim RowNrLow As Long
gt; Dim RowNrHigh As Long
gt; Dim TableEntryLow As Double
gt; Dim TableEntryHigh As Double
gt; Dim ToFindLow As Double
gt; Dim ToFindHigh As Double
gt; Dim i As Long
gt; Dim a As Double
gt; Dim VBATable
gt;
gt; VBATable = Table ' read table into VBA for speed
gt;
gt; If ToFind lt; VBATable(1, 1) Or ToFind gt; VBATable(UBound(VBATable, 1), 1)
gt; Then
gt; TabInterpol = CVErr(xlErrNA)
gt; Exit Function
gt; End If
gt;
gt; If ToFind = VBATable(1, 1) Then ' do not interpolate for bottom
gt; TabInterpol = VBATable(1, ColumnNo)
gt; Exit Function
gt; End If
gt;
gt; If ToFind = VBATable(UBound(VBATable), 1) Then ' do not interpolate for
gt; end of table
gt; TabInterpol = VBATable(UBound(VBATable, 1), ColumnNo)
gt; Exit Function
gt; End If
gt;
gt; For i = 1 To Table.Rows.Count
gt; a = VBATable(i, 1)
gt; If a gt; ToFind Then
gt; RowNrLow = i - 1
gt; Exit For
gt; End If
gt; Next i
gt;
gt; If ToFind = a Then
gt; TabInterpol = VBATable(RowNrLow, ColumnNo)
gt; Exit Function
gt; End If
gt;
gt; RowNrHigh = RowNrLow 1
gt; TableEntryLow = VBATable(RowNrLow, ColumnNo)
gt; TableEntryHigh = VBATable(RowNrHigh, ColumnNo)
gt; ToFindLow = VBATable(RowNrLow, 1)
gt; ToFindHigh = VBATable(RowNrHigh, 1)
gt; TabInterpol = TableEntryLow (ToFind - ToFindLow) / (ToFindHigh -
gt; ToFindLow) _
gt; * (TableEntryHigh - TableEntryLow)
gt;
gt; End Function
gt; '
gt; ================================================== =======================
gt;
gt;
gt; --
gt; Kind regards,
gt;
gt; Niek Otten
gt;
gt; quot;duanequot; gt; wrote in message
gt; ...
gt;gt;i put your table in cells a3:d38 and your desired wind angle in cell a41
gt;gt;
gt;gt; in cell a43
gt;gt; =OFFSET($A$2,MATCH($A$41,$A$3:$A$38,1),0)
gt;gt;
gt;gt; and in cell a44
gt;gt; =OFFSET($A$2,MATCH($A$41,$A$3:$A$38,1) 1,0)
gt;gt;
gt;gt; this gives the wind angles below and above you desired wind angle
gt;gt;
gt;gt; in cells b43 and copied thru d44
gt;gt; =VLOOKUP($A43,$A$3:$D$38,COLUMN())
gt;gt;
gt;gt; in cell b41 copied thru d41
gt;gt;
gt;gt; =($A$41-$A$43)/($A$44-$A$43)*(B44-B43) B43
gt;gt;
gt;gt;
gt;gt;
gt;gt;
gt;gt; quot;teenquot; wrote:
gt;gt;
gt;gt;gt; how can i interpolate if the given values a
gt;gt;gt;
gt;gt;gt; WIND ANGLE Q(DEG) CA CS CM
gt;gt;gt;
gt;gt;gt;
gt;gt;gt; 0 0.00397 0.00000 0.000000
gt;gt;gt; 10 0.00394 -0.00012 -0.000065
gt;gt;gt; 20 0.00369 -0.00013 -0.000097
gt;gt;gt; 30 0.00398 -0.00008 -0.000108
gt;gt;gt; 40 0.00408 0.00002 -0.000137
gt;gt;gt; 50 0.00426 0.00023 -0.000177
gt;gt;gt; 60 0.00422 0.00062 -0.000223
gt;gt;gt; 70 0.00350 0.00117 -0.000020
gt;gt;gt; 80 0.00195 0.00097 0.000256
gt;gt;gt; 90 -0.00003 0.00088 0.000336
gt;gt;gt; 100 -0.00103 0.00098 0.000338
gt;gt;gt; 110 -0.00118 0.00106 0.000343
gt;gt;gt; 120 -0.00117 0.00117 0.000366
gt;gt;gt; 130 -0.00120 0.00120 0.000374
gt;gt;gt; 140 -0.00147 0.00114 0.000338
gt;gt;gt; 150 -0.00198 0.00100 0.000278
gt;gt;gt; 160 -0.00222 0.00075 0.000214
gt;gt;gt; 170 -0.00242 0.00037 0.000130
gt;gt;gt; 180 -0.00270 0.00000 0.000000
gt;gt;gt; 190 -0.00242 -0.00037 -0.000130
gt;gt;gt; 200 -0.00222 -0.00075 -0.000214
gt;gt;gt; 210 -0.00198 -0.00100 -0.000278
gt;gt;gt; 220 -0.00147 -0.00114 -0.000338
gt;gt;gt; 230 -0.00120 -0.00120 -0.000374
gt;gt;gt; 240 -0.00117 -0.00117 -0.000366
gt;gt;gt; 250 -0.00118 -0.00106 -0.000343
gt;gt;gt; 260 -0.00103 -0.00098 -0.000338
gt;gt;gt; 270 -0.00003 -0.00088 -0.000336
gt;gt;gt; 280 0.00195 -0.00097 -0.000256
gt;gt;gt; 290 0.00350 -0.00117 0.000020
gt;gt;gt; 300 0.00422 -0.00062 0.000223
gt;gt;gt; 310 0.00426 -0.00023 0.000177
gt;gt;gt; 320 0.00408 -0.00002 0.000137
gt;gt;gt; 330 0.00398 0.00008 0.000108
gt;gt;gt; 340 0.00396 0.00013 0.000097
gt;gt;gt; 350 0.00394 0.00012 0.000065
gt;gt;gt;
gt;gt;gt; Angle of Wind CA CS CM
gt;gt;gt;
gt;gt;gt; 121.66 -0.001175 0.001175 0.000367
gt;gt;gt;
gt;gt;gt;
gt;gt;gt; IF I TYPE 121.66 I WANT THE EXCELL TO LOOK UP THE VALUE FROM THE
gt;gt;gt; EQUIVALENT
gt;gt;gt; VALUE OF CA CS CM..
gt;gt;gt;
gt;gt;gt; THANK YOU.. HOPE YOU COULD HELP ME..
gt;gt;gt;
gt;
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()