Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I input dblTargetValue and dblLowScoreValue as Double into a VBA
function and show the output as a string, like this: Dim strOutput as string strOutput = CStr((dblTargetValue - dblLowScoreValue)) I want to round the output so that it doesn't show too many decimals, like this: * If dblTargetValue - dblLowScoreValue = 0 decimals, show 0 decimals * If dblTargetValue - dblLowScoreValue = 1 decimals, show 1 decimal * If dblTargetValue - dblLowScoreValue = 2 decimals, show 2 decimals * If dblTargetValue - dblLowScoreValue = 3 decimals, show 3 decimals I really need help with this immediately because I have a deadline to keep so I'm very grateful for help! Regards, SE |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Format Decimals and Whole Numbers | Excel Programming | |||
Cell format decimals | Excel Discussion (Misc queries) | |||
how do I format decimals | Excel Programming | |||
how do I format decimals | Excel Programming | |||
how do I format decimals | Excel Programming |