We have a simple timesheet in Excel.
We are sticking with Excel period.
Within the 'Hours' column, if someone enters 1.15 I want it to round to the nearest .25.
I found the following formula that I use on a my spreadsheet and it works fine.
ROUND(A1/.25,0)*.25
I am trying to incorporate this into VBA so that when the employee clicks a Submit button it rounds the value(s) for them.
I have the following code:
For Counter = 1 To 100
Set curCell = Worksheets("Project List").Cells(Counter, 5)Cells(curCell) = Round(Cells(curCell).Value / 0.25, 0) * 0.25
I may be making this too hard, I may be making this too simple.
If this post is too vague, my apologies, please let me know and I will provide more background.
Thanks.
We are sticking with Excel period.
Within the 'Hours' column, if someone enters 1.15 I want it to round to the nearest .25.
I found the following formula that I use on a my spreadsheet and it works fine.
ROUND(A1/.25,0)*.25
I am trying to incorporate this into VBA so that when the employee clicks a Submit button it rounds the value(s) for them.
I have the following code:
For Counter = 1 To 100
Set curCell = Worksheets("Project List").Cells(Counter, 5)Cells(curCell) = Round(Cells(curCell).Value / 0.25, 0) * 0.25
I may be making this too hard, I may be making this too simple.
If this post is too vague, my apologies, please let me know and I will provide more background.
Thanks.