View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
OssieMac OssieMac is offline
external usenet poster
 
Posts: 2,510
Default Complex If/Or/And formula

Hello Ron,

I have not tested the following to the nth degree but if any of the
conditions do not appear to work as they should then give me an example of G3
and H3 values that do not work. I purely followed your written explanation
for the conditions.

When using OR, you can nest AND within the OR conditions when the OR
condition incorporates 2 conditions as per your explanation.

As a tip when creating these conditional formulas, enter them in a cell on a
worksheet and they return a true or false in the cell and it is easy to test
them by changing the values on the worksheet. When you have the formula
correct, highlight the formula in the formula bar then Copy and then press
Enter or Esc and you can then paste them into the conditional format formula.
(Don't forget the Enter or Esc after Copy to get out of the Formula bar or
you will have all sorts of problems.)

Also, do you really want NOW() and not TODAY(). NOW() is date and time and
TODAY() is date only?

=OR(ISBLANK(G3),AND(WORKDAY(NOW(),0)-WORKDAY(G3,0)<7,ISBLANK(H3)),AND(WORKDAY(NOW(),0)-WORKDAY(G3,0)<7,WORKDAY(H3,0)<NOW()))

--
Regards,

OssieMac


"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: ---
.