0

How might I go about writing a code for the following function? I am pretty new to this so I'm not sure where to start.

'Shear modulus G = E/(2*(*(1+nu))

Function G_shearmodulusG(E,nu)
Community
  • 1
  • 1
  • 2
    Perhaps post a link to a definition of Shear Modulus, E and nu. Have you written VBA code before? UDFs are quite easy, with lots of net resources... Try writing your function and add it to your Question (Edit your Question), as this wil attract more assistance – Grantly Apr 06 '18 at 19:07
  • 2
    This will give you a big leg up I think... https://stackoverflow.com/questions/2781689/how-to-return-a-result-from-a-vba-function?rq=1 – Grantly Apr 06 '18 at 19:09
  • 2G (1+υ) = E =3K (1−2υ), would you not have to write functions to find some of the other parameters or you will be inputting the variables? – Wookies-Will-Code Apr 06 '18 at 19:59

1 Answers1

0

Something like this? I'm not sure what that extra (* is in there though (maybe some special kind of math thing that I'm not familiar with):

Sub Test()

Debug.Print G_shearmodulusG(5, 2)

End Sub
Function G_shearmodulusG(E, nu)

G_shearmodulusG = E / (2 * (1 + nu))

End Function
dwirony
  • 5,487
  • 3
  • 21
  • 43