Convert Radian to degree angle for COS function

  • Thread starter Thread starter catherine
  • Start date Start date
C

catherine

Hi,

Do you know how I can ask to Excel with a VBA code to find the Cosinus of
the active cell value when the cell value is in Degree?

Thanks
Catherine
 
You can ignore the msgbox bit, I just put it there when I tested the code!

All you need is multiply by 180, divide by pi [worksheetfunction.pi()]
 
Your title says convert radians to degrees, but your post says degreed to
radians!

Degrees --> Radians:
activecell.value * worksheetfunction.pi() / 180

Radians --> Degrees:
activecell.value * 180 /worksheetfunction.pi()
 
in message
Your title says convert radians to degrees, but your post says degreed to
radians!

:-)

Presumably the OP wants to convert degrees to radians for use in Excel's
trig functions

Note Excel also has worksheet functions Radians(deg) and Degrees(rad)

Regards,
Peter T
 
I felt it was important to share the maths behind it, and to stage the answer
in three parts.
 
Back
Top