Help with a hotel billing system...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have to create a billing system as part of some ict coursework, it needs to
be able to know automatically how many weekend nights there are between set
dates. ive tried loads of formulas but none work, can anyone help?
 
Use something like

=A2-A1-NETWORKDAYS(A1,A2)

where A1 is the start date and A2 is the end date. The
NETWORKDAYS is part of the Analysis Tool Pak add-in, so you must
have this loaded to use the function. Go to the Tools menu,
choose Add-Ins, and select Analysis Tool Pak from the list.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
IT COMES UP WITH A DATE IN 1975! (WHAT DO THE a1 and a2 at the end mean and
dont i have ti define the network days)
 
Somewhere in your workbook create a column of known holiday dates. Select the
column of dates and click on NAME, DEFINE and name the selection HOLIDAYS (or
anything you want really). In your formula example the start date is A1 and
the end date is a2. Add the named range to the formula as the third (and
optional) argument as in the example below:

The NETWORKINGDAYS(A1,A2,HOLIDAYS)
 
aghh yes it works!!
ty all

Kevin B said:
Somewhere in your workbook create a column of known holiday dates. Select the
column of dates and click on NAME, DEFINE and name the selection HOLIDAYS (or
anything you want really). In your formula example the start date is A1 and
the end date is a2. Add the named range to the formula as the third (and
optional) argument as in the example below:

The NETWORKINGDAYS(A1,A2,HOLIDAYS)
 
OH NOW ITS STOPPED WORKIN AGAIN, IT WORKS SOMEOF THE TIME, BUT WHEN I do like
10/02/2006 to 12/02/2006 it still only says 1shudnt it be 2 nights?
 
its realli touchy, weneva i put hloidays in it just stays as one, and also
doesnt it count the day of the start?
 
Because networkdays counts both start and end dates you need to adjust
the formula slightly to get correct results in all cases

=A2-A1-NETWORKDAYS(A1,A2)+1

an alternative without NETWORKDAYS....

=SUM(INT((WEEKDAY(A1-{0,1})+A2-A1)/7))

although you can't accommodate holidays (easily) with this
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top