View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default Complex If/Or/And formula

Your two discriptions of the problem are not consistant. In one case you use
WORKDAY in the other you say nothing about WORKDAY. Note that
WORKDAY(NOW(),0) just returns the current date. And likewise WORKDAY(H3,0)
just returns the date in H3. In the first case you could use just TODAY(),
no need for WORKDAY and in the second case, assuming there is a date in H3,
not a date and time, you could just use H3.

Here is a formula that seems to do what you might be looking for:

=IF(OR(G1="",AND(H1="",(TODAY()-G1)<7),AND(H1<TODAY(),(TODAY()-G1)<7)),TRUE,"")

In the conditional formatting area you would modify this to read:

=OR(G1="",AND(H1="",(TODAY()-G1)<7),AND(H1<TODAY(),(TODAY()-G1)<7))

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Ron Luzius" wrote:

I am working on a formula that has me frazzled. I can't get seem to get the
correct result for all of my scenarios.

Column G is Planned End Date
Column H is Revised End Date

This is what I have so far;
=OR(ISBLANK(G3),(WORKDAY(NOW(),0)-WORKDAY(G3,0)<7),OR((WORKDAY(H3,0)<WORKDAY(NOW(),0 )),ISBLANK(H3)))

I am going to use the formula in a Conditional Formatting for Column G
If any of the "tests" are true, I will color the cell Red.

IF G3 is Blank TRUE
IF G3 < 7 days from NOW() and H3 is Blank TRUE
IF G3 < 7 days from NOW() and H3 < NOW() TRUE



--- news://freenews.netfront.net/ - complaints: ---
.