Cube Root

maloneb

New Member
Joined
Aug 1, 2011
Messages
20
Hey,

Is there anyway of programming VBA to perform a cube root of a number/variable? I need to use the function in an equation.

Cheers
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Like this:
Excel Workbook
AB
1273
Sheet


... sorry, just spotted that you wanted this in VBA. Will post back in a minute.

EDIT : In VBA:
Code:
Sub cuberoot()
x = 27
y = x ^ (1 / 3)
MsgBox y
End Sub
 
Last edited:
Upvote 0
It's ok guys, I realised i was being an idiot just before you posted. Of course it ^(1/3)! It seems I can't do simple maths this morning.

Cheers though!
 
Upvote 0

Forum statistics

Threads
1,224,516
Messages
6,179,231
Members
452,898
Latest member
Capolavoro009

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top