Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 121
Default Subtracting Dates to Find the Difference in Hours

I am trying to create a formula that will find the difference in hours
between 1/9/2009 (I2) and 1/12/2009 (J2) in hours without including weekends.
Bob Phillips recommended this formula.

=NETWORKDAYS(I2,J2)-(WEEKDAY(I2,2)<6)
+(1-MOD(I2,1))*(WEEKDAY(I2,2)<6)
+(MOD(J2,1)-1)*(WEEKDAY(J2,2)<6)

However when I try to use it I get this message #NAME? Any advice?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default Subtracting Dates to Find the Difference in Hours

The NETWORKDAYS function requires the Analysis ToolPak add in. To activate
it, click Tools/Add-Ins on Excel's menu bar and put a check mark in its
CheckBox.

--
Rick (MVP - Excel)


"Workbook" wrote in message
...
I am trying to create a formula that will find the difference in hours
between 1/9/2009 (I2) and 1/12/2009 (J2) in hours without including
weekends.
Bob Phillips recommended this formula.

=NETWORKDAYS(I2,J2)-(WEEKDAY(I2,2)<6)
+(1-MOD(I2,1))*(WEEKDAY(I2,2)<6)
+(MOD(J2,1)-1)*(WEEKDAY(J2,2)<6)

However when I try to use it I get this message #NAME? Any advice?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 121
Default Subtracting Dates to Find the Difference in Hours

Hi Rick,

Thank you for the tip. I appreciate your help. The obstacle I am having
now is that the cell with the formula says True instead of giving the hours.
Do you have any thoughts what might be causing that? Changing the format of
the cells didn't seem to make a difference.


"Rick Rothstein" wrote:

The NETWORKDAYS function requires the Analysis ToolPak add in. To activate
it, click Tools/Add-Ins on Excel's menu bar and put a check mark in its
CheckBox.

--
Rick (MVP - Excel)


"Workbook" wrote in message
...
I am trying to create a formula that will find the difference in hours
between 1/9/2009 (I2) and 1/12/2009 (J2) in hours without including
weekends.
Bob Phillips recommended this formula.

=NETWORKDAYS(I2,J2)-(WEEKDAY(I2,2)<6)
+(1-MOD(I2,1))*(WEEKDAY(I2,2)<6)
+(MOD(J2,1)-1)*(WEEKDAY(J2,2)<6)

However when I try to use it I get this message #NAME? Any advice?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default Subtracting Dates to Find the Difference in Hours

I can't duplicate your problem... the formula returns a numeric value for
me. Did you copy/paste the formula or, if you typed it, did you get all the
parentheses? Here is the formula in a form that I think will copy/paste
directly...

=NETWORKDAYS(I2,J2)-(WEEKDAY(I2,2)<6)+(1-MOD(I2,1))*(WEEKDAY(I2,2)<6)+(MOD(J2,1)-1)*(WEEKDAY(J2,2)<6)

--
Rick (MVP - Excel)


"Workbook" wrote in message
...
Hi Rick,

Thank you for the tip. I appreciate your help. The obstacle I am having
now is that the cell with the formula says True instead of giving the
hours.
Do you have any thoughts what might be causing that? Changing the format
of
the cells didn't seem to make a difference.


"Rick Rothstein" wrote:

The NETWORKDAYS function requires the Analysis ToolPak add in. To
activate
it, click Tools/Add-Ins on Excel's menu bar and put a check mark in its
CheckBox.

--
Rick (MVP - Excel)


"Workbook" wrote in message
...
I am trying to create a formula that will find the difference in hours
between 1/9/2009 (I2) and 1/12/2009 (J2) in hours without including
weekends.
Bob Phillips recommended this formula.

=NETWORKDAYS(I2,J2)-(WEEKDAY(I2,2)<6)
+(1-MOD(I2,1))*(WEEKDAY(I2,2)<6)
+(MOD(J2,1)-1)*(WEEKDAY(J2,2)<6)

However when I try to use it I get this message #NAME? Any advice?




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 121
Default Subtracting Dates to Find the Difference in Hours

I must have done something incorrectly with the formula. It works awesome
now. Thank you Rick, you're the man!

"Rick Rothstein" wrote:

I can't duplicate your problem... the formula returns a numeric value for
me. Did you copy/paste the formula or, if you typed it, did you get all the
parentheses? Here is the formula in a form that I think will copy/paste
directly...

=NETWORKDAYS(I2,J2)-(WEEKDAY(I2,2)<6)+(1-MOD(I2,1))*(WEEKDAY(I2,2)<6)+(MOD(J2,1)-1)*(WEEKDAY(J2,2)<6)

--
Rick (MVP - Excel)


"Workbook" wrote in message
...
Hi Rick,

Thank you for the tip. I appreciate your help. The obstacle I am having
now is that the cell with the formula says True instead of giving the
hours.
Do you have any thoughts what might be causing that? Changing the format
of
the cells didn't seem to make a difference.


"Rick Rothstein" wrote:

The NETWORKDAYS function requires the Analysis ToolPak add in. To
activate
it, click Tools/Add-Ins on Excel's menu bar and put a check mark in its
CheckBox.

--
Rick (MVP - Excel)


"Workbook" wrote in message
...
I am trying to create a formula that will find the difference in hours
between 1/9/2009 (I2) and 1/12/2009 (J2) in hours without including
weekends.
Bob Phillips recommended this formula.

=NETWORKDAYS(I2,J2)-(WEEKDAY(I2,2)<6)
+(1-MOD(I2,1))*(WEEKDAY(I2,2)<6)
+(MOD(J2,1)-1)*(WEEKDAY(J2,2)<6)

However when I try to use it I get this message #NAME? Any advice?







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Subtracting Dates to Find the Difference in Hours

If you're getting TRUE rather than the numerical value, you have perhaps put
an = sign where there should have been a minus sign?

For your original question, if you having difficulty with an Excel function
your first port of call ought always to be Excel help for that function.
That would have told you the answer to your #NAME? problem.
--
David Biddulph


"Workbook" wrote in message
...
Hi Rick,

Thank you for the tip. I appreciate your help. The obstacle I am having
now is that the cell with the formula says True instead of giving the
hours.
Do you have any thoughts what might be causing that? Changing the format
of
the cells didn't seem to make a difference.


"Rick Rothstein" wrote:

The NETWORKDAYS function requires the Analysis ToolPak add in. To
activate
it, click Tools/Add-Ins on Excel's menu bar and put a check mark in its
CheckBox.

--
Rick (MVP - Excel)


"Workbook" wrote in message
...
I am trying to create a formula that will find the difference in hours
between 1/9/2009 (I2) and 1/12/2009 (J2) in hours without including
weekends.
Bob Phillips recommended this formula.

=NETWORKDAYS(I2,J2)-(WEEKDAY(I2,2)<6)
+(1-MOD(I2,1))*(WEEKDAY(I2,2)<6)
+(MOD(J2,1)-1)*(WEEKDAY(J2,2)<6)

However when I try to use it I get this message #NAME? Any advice?





  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 121
Default Subtracting Dates to Find the Difference in Hours

thanks for the input David, I appreciate your feedback.

Ed

"David Biddulph" wrote:

If you're getting TRUE rather than the numerical value, you have perhaps put
an = sign where there should have been a minus sign?

For your original question, if you having difficulty with an Excel function
your first port of call ought always to be Excel help for that function.
That would have told you the answer to your #NAME? problem.
--
David Biddulph


"Workbook" wrote in message
...
Hi Rick,

Thank you for the tip. I appreciate your help. The obstacle I am having
now is that the cell with the formula says True instead of giving the
hours.
Do you have any thoughts what might be causing that? Changing the format
of
the cells didn't seem to make a difference.


"Rick Rothstein" wrote:

The NETWORKDAYS function requires the Analysis ToolPak add in. To
activate
it, click Tools/Add-Ins on Excel's menu bar and put a check mark in its
CheckBox.

--
Rick (MVP - Excel)


"Workbook" wrote in message
...
I am trying to create a formula that will find the difference in hours
between 1/9/2009 (I2) and 1/12/2009 (J2) in hours without including
weekends.
Bob Phillips recommended this formula.

=NETWORKDAYS(I2,J2)-(WEEKDAY(I2,2)<6)
+(1-MOD(I2,1))*(WEEKDAY(I2,2)<6)
+(MOD(J2,1)-1)*(WEEKDAY(J2,2)<6)

However when I try to use it I get this message #NAME? Any advice?






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
WORK HOURS DIFFERENCE BETWEEN TWO DATES CHRISTI Excel Worksheet Functions 14 March 18th 20 08:16 AM
Subtracting first and last values in a row to find net difference Tropikat Excel Worksheet Functions 10 October 7th 08 10:56 PM
get hours between 2 dates subtracting the weekends Cynthia Excel Discussion (Misc queries) 4 May 11th 06 08:00 PM
Need difference between two dates/times in hours ramsdesk Excel Worksheet Functions 10 April 25th 06 11:33 PM
Subtracting dates to get hours... but I want to skip weekends shadestreet Excel Discussion (Misc queries) 2 October 5th 05 06:20 PM


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

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

About Us

"It's about Microsoft Excel"