Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Does anyone know how to replicate the worksheet function Tanh in VBA? It
returns the hyperbolic tangent of a number. It doesn't exist in this syntax in VBA, but I was wondering if there is a different syntax or easy code to recreate it. Thanks Adam Bush |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can use the worksheet function:
Application.Tanh(...) wrote: Does anyone know how to replicate the worksheet function Tanh in VBA? It returns the hyperbolic tangent of a number. It doesn't exist in this syntax in VBA, but I was wondering if there is a different syntax or easy code to recreate it. Thanks Adam Bush -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
T = worksheetfunction.Tanh(123)
" wrote: Does anyone know how to replicate the worksheet function Tanh in VBA? It returns the hyperbolic tangent of a number. It doesn't exist in this syntax in VBA, but I was wondering if there is a different syntax or easy code to recreate it. Thanks Adam Bush |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can always reach out to the worksheet TANH function to do that...
HyperbolicTangent = WorksheetFunction.Tanh(YourNumber) -- Rick (MVP - Excel) " m wrote in message ... Does anyone know how to replicate the worksheet function Tanh in VBA? It returns the hyperbolic tangent of a number. It doesn't exist in this syntax in VBA, but I was wondering if there is a different syntax or easy code to recreate it. Thanks Adam Bush |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub adam()
MsgBox (Application.WorksheetFunction.Tanh(0.1)) End Sub -- Gary''s Student - gsnu200828 " wrote: Does anyone know how to replicate the worksheet function Tanh in VBA? It returns the hyperbolic tangent of a number. It doesn't exist in this syntax in VBA, but I was wondering if there is a different syntax or easy code to recreate it. Thanks Adam Bush |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
and just be different
X = 0.7 Tanh = (Exp(X) - Exp(-X)) / (Exp(X) + Exp(-X)) Mike " wrote: Does anyone know how to replicate the worksheet function Tanh in VBA? It returns the hyperbolic tangent of a number. It doesn't exist in this syntax in VBA, but I was wondering if there is a different syntax or easy code to recreate it. Thanks Adam Bush |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks a lot for your help guys.
\ Adam Bush "Mike H" wrote: and just be different X = 0.7 Tanh = (Exp(X) - Exp(-X)) / (Exp(X) + Exp(-X)) Mike " wrote: Does anyone know how to replicate the worksheet function Tanh in VBA? It returns the hyperbolic tangent of a number. It doesn't exist in this syntax in VBA, but I was wondering if there is a different syntax or easy code to recreate it. Thanks Adam Bush |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
tanh | Excel Discussion (Misc queries) | |||
User Function Question: Collect Condition in Dialog Box - But How toInsert into Function Equation? | Excel Programming | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Excel - User Defined Function Error: This function takes no argume | Excel Programming | |||
Offset function with nested match function not finding host ss. | Excel Worksheet Functions |