Count nursing hours only when onsite

For PBJ staffing reports, offsite nursing hours become 0. Other hours stay.

What you'll make

In Excel: 8.5 hours, nursing, offsite becomes 0 hours.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1OR(NOT(ISLOGICAL(B8)),NOT(ISLOGICAL(C8)))Checks that B and C hold TRUE or FALSE.FALSE
2"Review nursing/onsite flags"The message when a flag isn't TRUE or FALSE.Not used for row 8
3IF(AND(B8,NOT(C8)),0,A8)Nursing and not onsite gives 0, else the hours.0
4IF( … )Shows part 2 if part 1 is TRUE, else part 3.0

Columns B and C must hold TRUE or FALSE, not yes or no. Roles other than nursing keep their hours.

=IF(OR(NOT(ISLOGICAL(B8)),NOT(ISLOGICAL(C8))),"Review nursing/onsite flags",IF(AND(B8,NOT(C8)),0,A8))

How to use it

Yellow bar at the top? Click Enable Editing.

  1. See it work. The Example tab shows 20 made-up examples with the formula already in.
  2. Use your own hours. Paste the hours and TRUE or FALSE for nursing role and onsite into the green columns of the Template tab. The counted hours fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Take the nursing role from your own job title list, not from the title's wording. An admin nursing title still counts.