Apr 6, 2005 #1 andywing Technical User Nov 15, 2001 10 GB In Excel 2000 April 1, 2005 - March 10, 2005 = 22 I want this to display the 22 as 3 weeks 1 day(s) I think that makes sense! Is this easy? Andy Wing Local Government - Systems Administrator England
In Excel 2000 April 1, 2005 - March 10, 2005 = 22 I want this to display the 22 as 3 weeks 1 day(s) I think that makes sense! Is this easy? Andy Wing Local Government - Systems Administrator England
Apr 6, 2005 #2 carrr Technical User Sep 10, 2001 3,543 US See the "Calculating Age in VBA" example on this site: http://www.cpearson.com/excel/DateTimeVBA.htm Tired of waiting for an answer? Try asking better questions. See: faq222-2244 Upvote 0 Downvote
See the "Calculating Age in VBA" example on this site: http://www.cpearson.com/excel/DateTimeVBA.htm Tired of waiting for an answer? Try asking better questions. See: faq222-2244
Apr 6, 2005 #3 S SkipVought Programmer Dec 4, 2001 47,487 US hi, [tt] a1 = 22 weeks: =int(A1/7) Days: =mod(A1,7) [/tt] Skip, [red]Be advised:[/red] When you ignite a firecracker in a bowl of vanilla, chocolate & strawberry ice cream, you get... Neopolitan Blownapart! Upvote 0 Downvote
hi, [tt] a1 = 22 weeks: =int(A1/7) Days: =mod(A1,7) [/tt] Skip, [red]Be advised:[/red] When you ignite a firecracker in a bowl of vanilla, chocolate & strawberry ice cream, you get... Neopolitan Blownapart!
Apr 6, 2005 1 #4 mbarron Technical User Aug 3, 2001 1,247 US Assuming A1 is greater of the two dates and B1 is the lesser: =int((A1-B1)/7)&" weeks " &(A1-B1)- int((A1-B1)/7)*7&" day(s)" Mike Upvote 0 Downvote
Assuming A1 is greater of the two dates and B1 is the lesser: =int((A1-B1)/7)&" weeks " &(A1-B1)- int((A1-B1)/7)*7&" day(s)" Mike
Apr 6, 2005 #5 mbarron Technical User Aug 3, 2001 1,247 US After seeing Skip's solution - The mof function would be much easier: =TRUNC((A1-B1)/7)&" weeks " &MOD((A1-B1),7)&" day(s)" Mike Upvote 0 Downvote
After seeing Skip's solution - The mof function would be much easier: =TRUNC((A1-B1)/7)&" weeks " &MOD((A1-B1),7)&" day(s)" Mike
Apr 6, 2005 Thread starter #6 andywing Technical User Nov 15, 2001 10 GB Thank you Mike (mbarron) that works a treat, there's no way that I would have got there! Brilliant! Andy Wing Local Government - Systems Administrator England Upvote 0 Downvote
Thank you Mike (mbarron) that works a treat, there's no way that I would have got there! Brilliant! Andy Wing Local Government - Systems Administrator England