Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am working on a time card and what they want is a colum that shows vacation
time, sick time ect. No problem I have all that. But what they also want is someone is gone for 1.5 hours it is to show as 2, but subtract as 1.5 Any ideas on this one? Oh and the person I am doing this for, likes to "tweak it" after I have worked on it. So I also need to make it tweak proof..... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can set the NumberFormat of the range to "0" so it shows the rounded
value (as returned by .Text), but calculations will use the .Value (1.5). Note however, that anyone looking at such a table may think it incorrect, as the visible total may well not match any calculations. Private Sub CommandButton2_Click() With Range("A1") .NumberFormat = "0" .Value = 1.5 MsgBox .Value * 10 MsgBox .Text End With End Sub NickHK " wrote in message ... I am working on a time card and what they want is a colum that shows vacation time, sick time ect. No problem I have all that. But what they also want is someone is gone for 1.5 hours it is to show as 2, but subtract as 1.5 Any ideas on this one? Oh and the person I am doing this for, likes to "tweak it" after I have worked on it. So I also need to make it tweak proof..... |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Nick! I am sure this will work, now if I can just figure out how to
program a little hand that will smack his when he tries to change the rest of the formula's around.................. :) "NickHK" wrote: You can set the NumberFormat of the range to "0" so it shows the rounded value (as returned by .Text), but calculations will use the .Value (1.5). Note however, that anyone looking at such a table may think it incorrect, as the visible total may well not match any calculations. Private Sub CommandButton2_Click() With Range("A1") .NumberFormat = "0" .Value = 1.5 MsgBox .Value * 10 MsgBox .Text End With End Sub NickHK " wrote in message ... I am working on a time card and what they want is a colum that shows vacation time, sick time ect. No problem I have all that. But what they also want is someone is gone for 1.5 hours it is to show as 2, but subtract as 1.5 Any ideas on this one? Oh and the person I am doing this for, likes to "tweak it" after I have worked on it. So I also need to make it tweak proof..... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
add rounded numbers using the rounded value | Excel Discussion (Misc queries) | |||
Rounded Corners in Excel 2007 Not Working?!?! | Charts and Charting in Excel | |||
Timesheet Calculation with Time Rounded | Excel Discussion (Misc queries) | |||
Using rounded time with vlookup | Excel Discussion (Misc queries) | |||
Cell contents with custom time format rounded after double-click | Excel Discussion (Misc queries) |