Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
using vba code to find the square root of a number
NK,
Try something like the following: Dim N As Double Dim P As Double N = 27 P = N^(1/3) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "NK" wrote in message ... Hi I am trying to code a formula that invloves taking the square root of the number and for some reason the vba code won't let me do it. I can set it up so it runs it's using the excel function (which won't seem to call itself in teh code either) in an excel book but I would prefer to keep it all in the code. Any help would be appreciated. Thanks NK |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
using vba code to find the square root of a number
P = N^(1/3)
Of course, that should be P=N^(1/2) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Chip Pearson" wrote in message ... NK, Try something like the following: Dim N As Double Dim P As Double N = 27 P = N^(1/3) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "NK" wrote in message ... Hi I am trying to code a formula that invloves taking the square root of the number and for some reason the vba code won't let me do it. I can set it up so it runs it's using the excel function (which won't seem to call itself in teh code either) in an excel book but I would prefer to keep it all in the code. Any help would be appreciated. Thanks NK |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
square root | Excel Discussion (Misc queries) | |||
How do I get a (non-square) root of a given number | Excel Discussion (Misc queries) | |||
How do I find root mean square of a periodic data in Excel | Excel Discussion (Misc queries) | |||
using vba code to find the square root of a number | Excel Programming | |||
using vba code to find the square root of a number | Excel Programming |