A number of days into weeks and days

R

Robert Christie

Hi

Taking date of the 5-8-2005 from 30-8-2005 then dividing the answer by 7
gives 3.571429.......weeks.
How do you convert the decimal part of 0.571429 into number of days?. i.e. 4
Can an Excel formula give the correct answer of 3 weeks 4 days.
--
Thank you

Regards
Aussie Bob C.
Using Windows XP Home + Office 2003 Pro
 
B

Bob Phillips

=INT((H1-G1)/7)&" weeks"&IF(MOD(H1-G1,7)=0,"",", "&MOD(H1-G1,7)&" days")

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
M

Mangesh Yadav

=INT(3.571429)
will give you 3 weeks

=(3.571429-INT(3.571429))*7
will give you 4 days

Replace 3.571429 with your formula

Mangesh
 
A

Alex Delamain

=mod(enddate - startsdate,7) will give the number of days.

so

=INT((enddate-startdate)/7)&" weeks "&MOD(enddate-startdate,7)&" days"

returns

3 weeks 4 day
 
R

Robert Christie

Thank you Bob, Mangesh and Alex for your quick replies.
--
Thank you

Regards
Aussie Bob C.
Using Windows XP Home + Office 2003 Pro
 
Top