Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default rounding out "time"

this formula works for me when i need to round out a number to the nearest
1/4;
however,
when i need to round out time to the nearest 15 minutes, it does not... any
sugggestions?

Dim vTargetValue1 As Long
Dim vTargetValue2 As Double
Dim vTargetValue
Const BillingIncrement = 25
If target.Count = 1 Then
vTargetValue1 = target.Value \ BillingIncrement
vTargetValue2 = target.Value / BillingIncrement
If vTargetValue1 < vTargetValue2 Then
target.Value = (vTargetValue1 + 1) / 100 * BillingIncrement
End If
End If

thanks in advance,
mark


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sort 2 column in the same time "" as dictionary "" Mahmoud Mustafa Excel Worksheet Functions 0 May 1st 10 01:53 PM
Disabling the "&[Time]" or "&[T]" in Excel headers and footers John Mirabella Excel Discussion (Misc queries) 2 January 15th 10 02:54 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
How do I "paste link", and "transpose" at the same time? Zhi Sheng Excel Discussion (Misc queries) 3 August 5th 08 02:40 AM
cannot use "Create List" and "Share Workbook" same time Devendra Excel Discussion (Misc queries) 0 October 26th 06 06:05 AM


All times are GMT +1. The time now is 09:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"