Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Annabelle
 
Posts: n/a
Default Determine weekday counts

I'm trying to show the number of days between two dates. The formula
below works, but counts EVERY day. I just want the weekdays counted
(exclude Sat and Sun). Can you assist?

=IF(AND(E20<"",G20<""),DAYS360(E20,G20),"")

  #2   Report Post  
bigwheel
 
Posts: n/a
Default

Check out the NETWORKDAYS function:-

Returns the number of whole working days between start_date and end_date.
Working days exclude weekends and any dates identified in holidays. Use
NETWORKDAYS to calculate employee benefits that accrue based on the number of
days worked during a specific term.

If this function is not available, run the Setup program to install the
Analysis ToolPak. After you install the Analysis ToolPak, you must enable it
by using the Add-Ins command on the Tools menu.


"Annabelle" wrote:

I'm trying to show the number of days between two dates. The formula
below works, but counts EVERY day. I just want the weekdays counted
(exclude Sat and Sun). Can you assist?

=IF(AND(E20<"",G20<""),DAYS360(E20,G20),"")


  #3   Report Post  
Annabelle
 
Posts: n/a
Default

That worked great, with one problem - when the dates are the same
(budgeted vs. actual), the result is 1 but should be zero. I added -1
to the end of the formula.

Thanks for your help.

  #4   Report Post  
Biff
 
Posts: n/a
Default

Yeah, but now when the dates aren't the same the calc will be off by 1!

Robbing Peter to pay Paul?

Try this:

=IF(budgeted=actual,0,your_formula_here))

Biff

"Annabelle" wrote in message
oups.com...
That worked great, with one problem - when the dates are the same
(budgeted vs. actual), the result is 1 but should be zero. I added -1
to the end of the formula.

Thanks for your help.



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
Autofill: Need to autofill one week block, (5) weekday only into cells. dstock Excel Discussion (Misc queries) 1 June 17th 05 08:21 PM
Determine Frequency in Filtered List Michael Excel Worksheet Functions 3 February 10th 05 07:57 PM
determine which cell a value is returned from curiousg Excel Discussion (Misc queries) 3 February 9th 05 07:15 PM
weekday display in excel abbylulu2 Excel Worksheet Functions 2 January 30th 05 02:47 PM
formula to determine the first column containing any data sd Excel Worksheet Functions 5 November 9th 04 08:06 PM


All times are GMT +1. The time now is 01:00 PM.

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

About Us

"It's about Microsoft Excel"