Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello,
In a sheet a have the following function : Public Function feetAndInchToMeters(feet, inch) As Single Dim sngFeet As Single Dim sngInches As Single Dim sngMeter As Single Dim feet2Meter As Single Dim inch2Meter As Single sngFeet = feet sngInches = inch feet2Meter = 0.3048 inch2Meter = 0.0254 ActiveCell.NumberFormat = "0.00 \m" sngMeter = (sngFeet * feet2Meter) + (sngInches * inch2Meter) feetAndInchToMeters = sngMeter End Function when I asign the function to a cell and insert the values 5 and 3 I get the number 1,6002 in sted of 1,60 m what is wrong whith my function ? Thanks in advance, Benny |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Conditional Format Not Working | Excel Discussion (Misc queries) | |||
Strange Format changes | Excel Worksheet Functions | |||
Keep custom format in new worksheet | Excel Discussion (Misc queries) | |||
How to format a date to a different format | Excel Discussion (Misc queries) | |||
When I select "format cells", the format dialog box does not disp. | Excel Worksheet Functions |