# Help with formula,

S

#### S

This is way above my basic spreadsheet knowledge so please if anyone can
help.

I am trying to automate a small section of a booking form, Example
In C7 26, D7 5, E7 2008. This represents 26th May 2008
In G7 5, H7 6, I7 2008. This represents 5th June 2008

M7 to show £229, which is a weeks rental
M8 to show £229, which is a weeks rental

I am trying to get M7 and M8 to show the cost for a week or part of a full
weeks rental in these cells based on the info (dates) where the dates are
entered.

I have some cells below this where I can work out a discount for part weeks
etc.(I can manage that bit.) And then give the total for their days stayed.

Any help appreciated.

If it helps I can put a link to a screen capture of the booking form, which
might explain it better.

S

#### Sandy Mann

If I understand you correctly then with the cost of a week's rental in C5,
then :

=INT((DATE(I7,H7,G7)-DATE(E7,D7,C7))/7)*C5

will give the cost of the number of full weeks rental and:

=ROUND(MOD((DATE(I7,H7,G7)-DATE(E7,D7,C7))/7,1)*C5,2)

will give the cost of the part week rental

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

Replace @mailinator.com with @tiscali.co.uk

S

#### S

Thanks Sandy

S from from not so ancient Falkirk

S

#### Sandy Mann

You're very welcome.

As an OT point, if you munge your address to the left of the @ sign, it will
stop you from being targeted by spam. Your internet provider however will
still be targeted but will not be able to deliver the mail. I have see it
said that in extreme circumstances it could actually bring down the site but
I think that it is more realistic to say that it causes them a lot more
work.. That is why most people also alter the address after the @ as well.

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings