#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default UDF for x^1/3

How would I go about creating a UDF, call it cuberoot, which can calculate
the cube root of a number? There doesn't seem to be a built in function for
cube roots, and rather than doing something like =10^1/3, I figured I could
learn a little VBA.

Thanks,

Dave
--
Brevity is the soul of wit.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default UDF for x^1/3

Function cuberoot(a)
cuberoot = a ^ (1 / 3)
End Function

--
Gary''s Student


"Dave F" wrote:

How would I go about creating a UDF, call it cuberoot, which can calculate
the cube root of a number? There doesn't seem to be a built in function for
cube roots, and rather than doing something like =10^1/3, I figured I could
learn a little VBA.

Thanks,

Dave
--
Brevity is the soul of wit.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default UDF for x^1/3

OK, that was easy.

Thanks.
--
Brevity is the soul of wit.


"Gary''s Student" wrote:

Function cuberoot(a)
cuberoot = a ^ (1 / 3)
End Function

--
Gary''s Student


"Dave F" wrote:

How would I go about creating a UDF, call it cuberoot, which can calculate
the cube root of a number? There doesn't seem to be a built in function for
cube roots, and rather than doing something like =10^1/3, I figured I could
learn a little VBA.

Thanks,

Dave
--
Brevity is the soul of wit.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default UDF for x^1/3

You may want to look at =power(), too.

Dave F wrote:

How would I go about creating a UDF, call it cuberoot, which can calculate
the cube root of a number? There doesn't seem to be a built in function for
cube roots, and rather than doing something like =10^1/3, I figured I could
learn a little VBA.

Thanks,

Dave
--
Brevity is the soul of wit.


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default UDF for x^1/3

Thanks.

Doesn't POWER() do the same thing as the ^ operator?

Dave
--
Brevity is the soul of wit.


"Dave Peterson" wrote:

You may want to look at =power(), too.

Dave F wrote:

How would I go about creating a UDF, call it cuberoot, which can calculate
the cube root of a number? There doesn't seem to be a built in function for
cube roots, and rather than doing something like =10^1/3, I figured I could
learn a little VBA.

Thanks,

Dave
--
Brevity is the soul of wit.


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default UDF for x^1/3

Yep.

But you said you couldn't find a builtin function.

Dave F wrote:

Thanks.

Doesn't POWER() do the same thing as the ^ operator?

Dave
--
Brevity is the soul of wit.

"Dave Peterson" wrote:

You may want to look at =power(), too.

Dave F wrote:

How would I go about creating a UDF, call it cuberoot, which can calculate
the cube root of a number? There doesn't seem to be a built in function for
cube roots, and rather than doing something like =10^1/3, I figured I could
learn a little VBA.

Thanks,

Dave
--
Brevity is the soul of wit.


--

Dave Peterson


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default UDF for x^1/3

Fair point, Dave.

Thanks again.

Dave
--
Brevity is the soul of wit.


"Dave Peterson" wrote:

Yep.

But you said you couldn't find a builtin function.

Dave F wrote:

Thanks.

Doesn't POWER() do the same thing as the ^ operator?

Dave
--
Brevity is the soul of wit.

"Dave Peterson" wrote:

You may want to look at =power(), too.

Dave F wrote:

How would I go about creating a UDF, call it cuberoot, which can calculate
the cube root of a number? There doesn't seem to be a built in function for
cube roots, and rather than doing something like =10^1/3, I figured I could
learn a little VBA.

Thanks,

Dave
--
Brevity is the soul of wit.

--

Dave Peterson


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"