Formulas and Conditional Formatting. Is there a better way to do this?

mcm2022

New Member
Joined
Aug 9, 2022
Messages
3
Office Version
  1. 365
  2. 2007
Hi,

I have an Office 365 sheet which shows a rota where a number of tasks can be allocated to staff members. The tasks are split into halves so they be carried out in the AM or PM of each day, either by a single member of staff or multiple members of staff. In Column T you can specify the number of staff required to carry out each task. Once that allocated number has been reached, the task should highlight in green in the Daily Tasks list on the right of the sheet.

In the sheet, for Base 1, the required amount of staff for Task D is 2 (i.e. 2 staff for AM and 2 staff for PM). The Daily Total is highlighting green for Task D even though it's allocated to 3 staff members during AM. Base 2 shows this correctly, where Task 3 is allocated between 2 staff members and split evenly across AM and PM.

Is there a better way to highlight those tasks so that they calculate correctly?

Any help would be very-much appreciated.

Thanks,
Mark.

rota.xlsx
ABCDEFGHIJRSTU
1BASE 1Monday AMMonday PMBASE 2Monday AMMonday PMDaily TasksCount
2Person ATask DTask DPerson 1Task 3Task 3Task 1220.5
3OfficeOfficeTask 2#####1#####
4Task 3022
5Person BTask DTask BPerson 2Task 3Task 1Task 4110.5
6OfficeOfficeTask A#####2#####
7Task B220.5
8Person CTask DTask CPerson 3Task 4Task 3Task C220.5
9OfficeOfficeTask D022
10
Monday
Cell Formulas
RangeFormula
S2:S9S2=T2-U2
U2U2=IF(SUMPRODUCT((G:G="Task 1")+(I:I="Task 1")/2)=0,"",SUMPRODUCT((G:G="Task 1")+(I:I="Task 1")/1))/2
U3U3=IF(SUMPRODUCT((G:G="Task 2")+(I:I="Task 2")/2)=0,"",SUMPRODUCT((G:G="Task 2")+(I:I="Task 2")/1))/2
U4U4=IF(SUMPRODUCT((G:G="Task 3")+(I:I="Task 3")/2)=0,"",SUMPRODUCT((G:G="Task 3")+(I:I="Task 3")/1))/2
U5U5=IF(SUMPRODUCT((G:G="Task 4")+(I:I="Task 4")/2)=0,"",SUMPRODUCT((G:G="Task 4")+(I:I="Task 4")/1))/2
U6U6=IF(SUMPRODUCT((B:B="Task A")+(D:D="Task A")/2)=0,"",SUMPRODUCT((B:B="Task A")+(D:D="Task A")/1))/2
U7U7=IF(SUMPRODUCT((B:B="Task B")+(D:D="Task B")/2)=0,"",SUMPRODUCT((B:B="Task B")+(D:D="Task B")/1))/2
U8U8=IF(SUMPRODUCT((B:B="Task C")+(D:D="Task C")/2)=0,"",SUMPRODUCT((B:B="Task C")+(D:D="Task C")/1))/2
U9U9=IF(SUMPRODUCT((B:B="Task D")+(D:D="Task D")/2)=0,"",SUMPRODUCT((B:B="Task D")+(D:D="Task D")/1))/2
Press CTRL+SHIFT+ENTER to enter array formulas.
Cells with Data Validation
CellAllowCriteria
A9List=Status
A3List=Status
A6List=Status
F3List=Status
F6List=Status
F9List=Status
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Conditional formatting/formula query
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top