# Confusing Multiple IF statements with AND

Occasional Visitor

# Confusing Multiple IF statements with AND

Hello -

I am trying to create a macros that will do the following :

Column F (Duration) = calculates the days between First engaged (D) and Last Check columns (E).

Column G (Agreement Time) This is the complex one =

If the Importance is HIGH AND Site is DA109 AND Service Owner is Painters AND Duration is =<3 THEN "WITHIN AGREEMENT"

OR

If the Importance is Medium AND Site is DA109 AND Service Owner is Painters AND Duration is =<3 days THEN "NOT WITHIN AGREEMENT"

OR

If the Importance is low AND Site is DA109 AND Service Owner is Painters AND Duration is =<3 days THEN "cancel"

OR

If the Importance is HIGH AND Site is DMT1944 AND Service Owner is Painters AND Duration is =<3 THEN "NOT WITHIN AGREEMENT"

depending on the site, importance and service owner combination, it will tell me if im within agreement or not.   I am attaching the main spreadsheet im working on, sheet one is the main sheet, sheet two is the logic for the formula, the thing is each cell will have the entire IF/AND/OR formula.