#1   Report Post  
JN
 
Posts: n/a
Default Function help!

Hi,

I need some help on how to write a formula to calcuate this:

If column A is before today's date,
OR column B is < 0, then column C is 0,
otherwise, calculate networkdays between today's date and column A

What makes it more complicated is if the date in column A is beyond 2005
(for example, 3/1/06), I want the # of days from now till 3/1/06 to separate
out into
# of days from now till 12/31/05, and 1/1/05 till 3/1/06.


Currently, this is what I have and it doesn't work.

IF(OR(AG3<0,AE3<=$B$265),0,NETWORKDAYS($B$265,MIN( AE3,DATEVALUE("12/31/05")))

$B$265 is a reference cell.


THANX!



  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

What does "it doesn't work" mean?

Assuming your "column A" is actually column AE, and that your "Column B"
is actually column AG, and that your "reference cell" contains today's
date, your example appears to work for me to return this year's work
days, though it would be more general if you changed
DATEVALUE("12/31/05") to DATE(YEAR($B$265)+1,1,0). You don't say what
"separate out" means - should the next year's portion go in a different
cell?

What do you expect to happen?

In article ,
"JN" wrote:

Hi,

I need some help on how to write a formula to calcuate this:

If column A is before today's date,
OR column B is < 0, then column C is 0,
otherwise, calculate networkdays between today's date and column A

What makes it more complicated is if the date in column A is beyond 2005
(for example, 3/1/06), I want the # of days from now till 3/1/06 to separate
out into
# of days from now till 12/31/05, and 1/1/05 till 3/1/06.


Currently, this is what I have and it doesn't work.

IF(OR(AG3<0,AE3<=$B$265),0,NETWORKDAYS($B$265,MIN( AE3,DATEVALUE("12/31/05")))

$B$265 is a reference cell.


THANX!

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
I NEED HELP with the SPELLNUMBER Function vag Excel Worksheet Functions 0 June 21st 05 08:17 AM
Excel option to store trendline's coefficients in cells for use Miguel Saldana Charts and Charting in Excel 9 June 20th 05 08:45 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Automatically up date time in a cell Mark Excel Discussion (Misc queries) 5 May 12th 05 12:26 AM
clock Wildman Excel Worksheet Functions 2 April 26th 05 10:31 AM


All times are GMT +1. The time now is 07:37 AM.

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"