می خوام داده های تشعشع خورشیدی که بر حسب رادیان هست رو به ساعت آفتابی تبدیل کنم فرمولش چه جوری هستش؟
تبدیل رادیان به ساعت
Collapse
X
-
با سلام
از فرمول زیر استفاده کنید اگر منظور شما از ساعت آفتابی درجه میباشد
angle زاویه به رادیان میباشدکد PHP:= DEGREES ( Angle )
اگر تبدیل درجه اعشاری به درجه و دقیقه و ثانیه هستش از مدول زیر استفاده کنید
کد PHP:Function Convert_Degree(Decimal_Deg) As Variant
With Application
'Set degree to Integer of Argument Passed
Degrees = Int(Decimal_Deg)
'Set minutes to 60 times the number to the right
'of the decimal for the variable Decimal_Deg
Minutes = (Decimal_Deg - Degrees) * 60
'Set seconds to 60 times the number to the right of the
'decimal for the variable Minute
Seconds = Format(((Minutes - Int(Minutes)) * 60), "0")
'Returns the Result of degree conversion
'(for example, 10.46 = 10~ 27 ' 36")
Convert_Degree = " " & Degrees & "° " & Int(Minutes) & "' " _
& Seconds + Chr(34)
End With
End Function
- [*=left]Start Excel and press ALT+F11 to start the Visual Basic editor.
[*=left]On the Insert menu, click Module.
[*=left]Enter the sample code for the Convert_Degree custom function described above into the module sheet.
[*=left]Press ALT+F11 to return to excel.
[*=left]In cell A1 type 10.46.
[*=left]In cell A2 type the following formula:کد PHP:=Convert_Degree(A1)
The formula returns 10°27'36"
Last edited by iranweld; 2015/07/01, 09:48. - [*=left]Start Excel and press ALT+F11 to start the Visual Basic editor.
-
ممنون بابت توجه تون واقعابا سلام
از فرمول زیر استفاده کنید اگر منظور از ساعت آفتابی درجه میباشد
angle زاویه به رادیان میباشدکد PHP:= DEGREES ( Angle )
اگر به دقیقه و ثانیه هستش
کد PHP:Function Convert_Degree(Decimal_Deg) As Variant
With Application
'Set degree to Integer of Argument Passed
Degrees = Int(Decimal_Deg)
'Set minutes to 60 times the number to the right
'of the decimal for the variable Decimal_Deg
Minutes = (Decimal_Deg - Degrees) * 60
'Set seconds to 60 times the number to the right of the
'decimal for the variable Minute
Seconds = Format(((Minutes - Int(Minutes)) * 60), "0")
'Returns the Result of degree conversion
'(for example, 10.46 = 10~ 27 ' 36")
Convert_Degree = " " & Degrees & "° " & Int(Minutes) & "' " _
& Seconds + Chr(34)
End With
End Function
- Start Excel and press ALT+F11 to start the Visual Basic editor.
- On the Insert menu, click Module.
- Enter the sample code for the Convert_Degree custom function described above into the module sheet.
- Press ALT+F11 to return to excel.
- In cell A1 type 10.46.
- In cell A2 type the following formula: کد PHP:
=Convert_Degree(A1)
The formula returns 10°27'36"
اگر فقط بخام بر حسب ساعت بده چه فرمولی؟مثلا فقط یه عدد ساعت باشه؟کامنت
-



کامنت