Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Conditional Formatting with NETWORKDAYS function


Hi everyone -- here's what I'm trying to do:

If the date in F3 is more than 2 WORK days greater than the date in E3,
turn the background in F3 red.

I'm trying to use the NETWORKDAYS function and avoid a bunch of VBA if
at all possible, but conditional formatting doesn't seem to allow this.
Any ideas or tips?

Thanks,
Richard


--
rlaw68
------------------------------------------------------------------------
rlaw68's Profile: http://www.excelforum.com/member.php...fo&userid=5744
View this thread: http://www.excelforum.com/showthread...hreadid=561117

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Conditional Formatting with NETWORKDAYS function

Maybe you could use a helper cell that contains the formula with the
=networkdays() function in it.

Then refer to that cell in your Format|Conditional formatting dialog.

rlaw68 wrote:

Hi everyone -- here's what I'm trying to do:

If the date in F3 is more than 2 WORK days greater than the date in E3,
turn the background in F3 red.

I'm trying to use the NETWORKDAYS function and avoid a bunch of VBA if
at all possible, but conditional formatting doesn't seem to allow this.
Any ideas or tips?

Thanks,
Richard

--
rlaw68
------------------------------------------------------------------------
rlaw68's Profile: http://www.excelforum.com/member.php...fo&userid=5744
View this thread: http://www.excelforum.com/showthread...hreadid=561117


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Conditional Formatting with NETWORKDAYS function

You could try this formula in CF

=SUMPRODUCT(INT((MAX($F$3,$E$3)-WEEKDAY(MAX($F$3,$E$3)+1-ROW(INDIRECT("2:6")
))-MIN($F$3,$E$3)+8)/7))

or

=SUMPRODUCT(INT((MAX($F$3,$E$3)-WEEKDAY(MAX($F$3,$E$3)+1-ROW(INDIRECT("2:6")
))-MIN($F$3,$E$3)+8)/7))
-SUMPRODUCT(ISNUMBER(MATCH(WEEKDAY(holidays),ROW(IN DIRECT("2:6")),0))*(holid
ays=MIN($F$3,$E$3))*(holidays<=MAX($F$3,$E$3)))

if you want holidays

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"rlaw68" wrote in
message ...

Hi everyone -- here's what I'm trying to do:

If the date in F3 is more than 2 WORK days greater than the date in E3,
turn the background in F3 red.

I'm trying to use the NETWORKDAYS function and avoid a bunch of VBA if
at all possible, but conditional formatting doesn't seem to allow this.
Any ideas or tips?

Thanks,
Richard


--
rlaw68
------------------------------------------------------------------------
rlaw68's Profile:

http://www.excelforum.com/member.php...fo&userid=5744
View this thread: http://www.excelforum.com/showthread...hreadid=561117



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
Conditional Formatting (IF function) Neo1 Excel Worksheet Functions 5 March 2nd 06 10:38 PM
Conditional Formatting - Formulas meandmyhorse Excel Discussion (Misc queries) 2 February 18th 06 12:58 PM
Conditional Formating & Rand() function BaldySlaphead Excel Discussion (Misc queries) 10 July 20th 05 03:43 PM
Conditional Formatting Error ddate Excel Worksheet Functions 0 May 5th 05 09:00 PM
conditional formatting conflict? Abi Excel Worksheet Functions 2 January 11th 05 03:41 PM


All times are GMT +1. The time now is 07:18 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"