ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Rounding Question (https://www.excelbanter.com/excel-worksheet-functions/30696-rounding-question.html)

Rweasel6

Rounding Question
 

Heres the short end of what Im trying to do. I am trying to subtract
two dates and return the number of months between the two dates. I can
get this part. The catch here is that I want the number of months to
come back as either whole months or half months. So 1/1/05-2/1/05 = 1
month and 1/1/05-2/15/05 = 1.5 months. My problem is that when I run
the calc I get numbers like 1.64 and using a round will give me 1.6
whereas I would want this number to come back as 1.5.
Any ideas?


--
Rweasel6
------------------------------------------------------------------------
Rweasel6's Profile: http://www.excelforum.com/member.php...o&userid=23251
View this thread: http://www.excelforum.com/showthread...hreadid=379078


N Harkawat

=floor(1.64,0.5)
will reduce 1.64 to 1.5
so you could enclose your formula as

=floor(your formula,0.5)

also take a look at function CEILING to round up your values to nearest 0.5


"Rweasel6" wrote in
message ...

Heres the short end of what Im trying to do. I am trying to subtract
two dates and return the number of months between the two dates. I can
get this part. The catch here is that I want the number of months to
come back as either whole months or half months. So 1/1/05-2/1/05 = 1
month and 1/1/05-2/15/05 = 1.5 months. My problem is that when I run
the calc I get numbers like 1.64 and using a round will give me 1.6
whereas I would want this number to come back as 1.5.
Any ideas?


--
Rweasel6
------------------------------------------------------------------------
Rweasel6's Profile:
http://www.excelforum.com/member.php...o&userid=23251
View this thread: http://www.excelforum.com/showthread...hreadid=379078




Rweasel6


works great thanks!!!


--
Rweasel6
------------------------------------------------------------------------
Rweasel6's Profile: http://www.excelforum.com/member.php...o&userid=23251
View this thread: http://www.excelforum.com/showthread...hreadid=379078



All times are GMT +1. The time now is 07:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com