Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 46
Default rounding a month upwards , after using an =datedif fomula

I use formula to calculate numbe rof elapsed months between 2 dates..

=datedif(a1,b1,"m")....

but then want to round up to 1 month, in case the time elapsed is actually
less than 1 month within the =dated calcs.

Anyhelp please?

Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default rounding a month upwards , after using an =datedif fomula

Maybe

=MAX(1,DATEDIF(A1,B1,"m"))

Mike

"spudsnruf" wrote:

I use formula to calculate numbe rof elapsed months between 2 dates..

=datedif(a1,b1,"m")....

but then want to round up to 1 month, in case the time elapsed is actually
less than 1 month within the =dated calcs.

Anyhelp please?

Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 46
Default rounding a month upwards , after using an =datedif fomula

Thats spot on!. Thank you..dont suppose you can solve my other problem
....(cant blame me for trying!)

I have an =sumif formula, which I am trying to total 2 criteria...

1 is if payment was from a given customer...which i can do...
but then to also only add that payment from the given customer if payment
was received before a given date?.

Thanks v much anyway.




"Mike H" wrote:

Maybe

=MAX(1,DATEDIF(A1,B1,"m"))

Mike

"spudsnruf" wrote:

I use formula to calculate numbe rof elapsed months between 2 dates..

=datedif(a1,b1,"m")....

but then want to round up to 1 month, in case the time elapsed is actually
less than 1 month within the =dated calcs.

Anyhelp please?

Thank you.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default rounding a month upwards , after using an =datedif fomula

Hi

Try
=SUMPRODUCT(($A$2:$A$100="CustomerA")*($B$2:$B$100 <DATE(2008,2,19))
where Column A contains Customers and column B contains Dates.
Change ranges to suit
Change comparison's to cell values if required
--
Regards
Roger Govier

"spudsnruf" wrote in message
...
Thats spot on!. Thank you..dont suppose you can solve my other problem
...(cant blame me for trying!)

I have an =sumif formula, which I am trying to total 2 criteria...

1 is if payment was from a given customer...which i can do...
but then to also only add that payment from the given customer if payment
was received before a given date?.

Thanks v much anyway.




"Mike H" wrote:

Maybe

=MAX(1,DATEDIF(A1,B1,"m"))

Mike

"spudsnruf" wrote:

I use formula to calculate numbe rof elapsed months between 2 dates..

=datedif(a1,b1,"m")....

but then want to round up to 1 month, in case the time elapsed is
actually
less than 1 month within the =dated calcs.

Anyhelp please?

Thank you.

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
Fomula for number of days on each month from a date range [email protected] Excel Discussion (Misc queries) 3 November 9th 06 03:08 AM
Month (datedif) to 1 decimal jennifer Excel Worksheet Functions 3 February 14th 06 07:47 PM
Datedif incorrect month count - February problem?? JMKCT Excel Worksheet Functions 4 December 14th 05 03:36 PM
rounding the DATEDIF function speary Excel Discussion (Misc queries) 3 July 20th 05 01:14 PM
DATEDIF calculates a month off Mary New Users to Excel 1 June 27th 05 11:36 PM


All times are GMT +1. The time now is 04:34 PM.

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

About Us

"It's about Microsoft Excel"