Calculating shift allowance

mwvirk

Active Member
Joined
Mar 2, 2011
Messages
293
Office Version
  1. 2016
Platform
  1. Windows
Hi
I would really appreciate if someone could help me to calculate my shift allowance based on the attached screenshot.
Kindly note that:
working days are Sunday to Thursday
Friday & Saturday are weekend

I think to calculate the holiday rate, we can add one extra cell having P (meaning if value in the cell is P and it's still working day i.e. Sun to Thu then calculate weekend rate)
Thank you.
 

Attachments

  • 1002263024.jpg
    1002263024.jpg
    128.9 KB · Views: 23
I don't have those issues:

View attachment 116433

It is a little difficult to debug it without having the correct excel version. But I will try.

Can you show me what you see when you select cell AJ2 and then hit F2 and then F9 (having the row filled as you showed in your last post).
What I see:

View attachment 116434

After that hit ESC to go back to the formula (or if you did hit enter, just go back one step).

Do the same for AU2. What I see:

View attachment 116435



1725535788869.png


1725535820168.png



from AJ2
1725535837210.png




from AJ3

1725535880204.png
 
Upvote 0

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
I don't get it, you should have just one Adam in your list in AJ2:AT2.

I don't know how to debug it without having the version of excel.
Maybe we could have a simple dropdown with all the names, and we mark it with a red background if it is duplicated. Would that work?
 
Upvote 0
I don't get it, you should have just one Adam in your list in AJ2:AT2.

I don't know how to debug it without having the version of excel.
Maybe we could have a simple dropdown with all the names, and we mark it with a red background if it is duplicated. Would that work?
Maybe we could have a simple dropdown with all the names, and we mark it with a red background if it is duplicated. Would that work?


yes. that will be OK as long as there is indication of duplicate entry.
 
Upvote 0
Ok.
here is the file for you to test:

ShiftAllowance4.zip

ShiftAllowance.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAH
1TypeDateDay of The WeekMorning Shift 08:00 Hrs To 16:00 HrsAfternoon Shift 16:00 Hrs To 24:00 HrsNight Shift 00:00 Hrs To 08:00 HrsOff ShiftVacationMikeGeorgePeterAlex CSamRogerAlex NAdam
2W01/08/2024ThuMikeGeorgeRogerAdamPeterAlex CAlex NSam
3WSatMikeMike
4WGeorgeGeorgeSamSam
5
Sheet1
Cell Formulas
RangeFormula
C2C2=TEXT(B2,"ddd")
C3C3=IF(B3="",TEXT(B3,"ddd"))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D2:V4Expression=SUM(($D2:$V2=D2)*(D2<>""))>1textNO
Cells with Data Validation
CellAllowCriteria
D2:V4List=Employees


Just one named range, and one rule for CF.
 
Upvote 0
Ok.
here is the file for you to test:

ShiftAllowance4.zip

ShiftAllowance.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAH
1TypeDateDay of The WeekMorning Shift 08:00 Hrs To 16:00 HrsAfternoon Shift 16:00 Hrs To 24:00 HrsNight Shift 00:00 Hrs To 08:00 HrsOff ShiftVacationMikeGeorgePeterAlex CSamRogerAlex NAdam
2W01/08/2024ThuMikeGeorgeRogerAdamPeterAlex CAlex NSam
3WSatMikeMike
4WGeorgeGeorgeSamSam
5
Sheet1
Cell Formulas
RangeFormula
C2C2=TEXT(B2,"ddd")
C3C3=IF(B3="",TEXT(B3,"ddd"))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D2:V4Expression=SUM(($D2:$V2=D2)*(D2<>""))>1textNO
Cells with Data Validation
CellAllowCriteria
D2:V4List=Employees


Just one named range, and one rule for CF.

I applied your format and it seems it is working as per requirement. now before going for the final calculation about the shift allowance, I need another check.
I am trying to count the total employees and then put the count at the end of each row. once I add any employee to the shift, this count should decrease and finally end at 0
This can help me know the total heads and ensure all are on the shift. I am sharing the picture.
i know that I have 8 employees but I cannot count so manually putting 8 in W
whenever I assign 1 person in the shift, this count should decrease and when all 8 are in the shifts, it will show me 0 to know all heads are used.


1727993186553.png






ShiftAllowance (v2016) 3.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAH
1TypeDateDay of The WeekMorning Shift 08:00 Hrs To 16:00 HrsAfternoon Shift 16:00 Hrs To 24:00 HrsNight Shift 00:00 Hrs To 08:00 HrsOff ShiftVacationMikeGeorgePeterAlex CSamRogerAlex NAdam
2W01-10-2024Tue
3W02-10-2024Wed
4W03-10-2024Thu0
5W04-10-2024Fri
6W05-10-2024Sat
7W06-10-2024Sun
8W07-10-2024Mon
9W08-10-2024Tue
10W09-10-2024Wed
Sheet1
Cell Formulas
RangeFormula
B2:B10B2=IF(MONTH(DATE($B$35,$A$35,1)+ROWS($A$1:$A1)-1)=$A$35,DATE($B$35,$A$35,1)+ROWS($A$1:$A1)-1,"")
C2:C10C2=TEXT(B2,"ddd")
X4X4=COUNT(X:AH)
Named Ranges
NameRefers ToCells
Employees=Sheet1!$X$1:$AH$1X4
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:C31Cell Valuecontains "Fri"textNO
C2:C31Cell Valuecontains "Sat"textNO
D2:V31Expression=SUM(($D2:$V2=D2)*(D2<>""))>1textNO
Cells with Data Validation
CellAllowCriteria
D2:V10List=Employees
 
Upvote 0
Would this work?:
in cell W2:

Excel Formula:
=8-COUNTA(D2:V2)

And drag down.
 
Upvote 0
Would this work?:
in cell W2:

Excel Formula:
=8-COUNTA(D2:V2)

And drag down.
It can work but if I hard code 8 then I don't have control when I add any new employee or when someone resign.
I was thinking if we can count X1:AH1 to calculate names?
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,183
Members
452,615
Latest member
bogeys2birdies

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