Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Change worksheet radian default
Is there an easy way to change the worksheet radian default to degrees so that I donīt have to use the 180/PI or PI/180 or the degrees function. The following is a formula to derive the Log Haversine of the number 30, Log((1-Cos(30*PI()/180)))/2)+10 and the following is to derive the number 30 from the Log Haversine, (Acos(1-(10^((D18-10))*2))*180/PI())/24 D18 being the cell with the log haversine. Surely there is an easier way to get a log haversine than this. Any help will be most appreciated. Scrungie. -- Scrungie ------------------------------------------------------------------------ Scrungie's Profile: http://www.excelforum.com/member.php...o&userid=16030 View this thread: http://www.excelforum.com/showthread...hreadid=466913 |
#2
|
|||
|
|||
There's no way to change the default. However, you could use the
RADIANS() function: =LOG((1-COS(RADIANS(30)))/2)+10 You could also use a UDF, which will be cleaner, though slower: Public Function CosD(degrees As Double) As Double Const dRad As Double = 0.0174532925199433 CosD = Cos(degrees * dRad) End Function call it as =LOG((1-CosD(30))/2)+10 and of course, you could put it all in a UDF: Public Function LogHaversine(degrees As Double) As Double Const dRad As Double = 0.0174532925199433 LogHaversine = Log((1 - Cos(degrees * dRad)) / 2) / Log(10) + 10 End Function if you're not familiar with UDFs see http://www.mvps.org/dmcritchie/excel/getstarted.htm In article , Scrungie wrote: Is there an easy way to change the worksheet radian default to degrees so that I donīt have to use the 180/PI or PI/180 or the degrees function. The following is a formula to derive the Log Haversine of the number 30, Log((1-Cos(30*PI()/180)))/2)+10 and the following is to derive the number 30 from the Log Haversine, (Acos(1-(10^((D18-10))*2))*180/PI())/24 D18 being the cell with the log haversine. Surely there is an easier way to get a log haversine than this. Any help will be most appreciated. Scrungie. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to change the tab order for a protected worksheet | Excel Worksheet Functions | |||
how to change default comment format in excel (2000) | Excel Discussion (Misc queries) | |||
Change the default chart colours | Charts and Charting in Excel | |||
Increase default size of worksheet | New Users to Excel | |||
Worksheet Row Change event | Excel Discussion (Misc queries) |