Lookup for attendance to return who is eligible for bonus.

VintageDan

New Member
Joined
Mar 29, 2022
Messages
6
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
Platform
  1. Windows
Hi all,

I am looking to create a formula that will look up a list of employees and check to see if they have had any sickness incidents within a month. This will then show eligible or ineligible for their name.

I have tried various IF and VLOOKUP methods, and that is where my knowledge ends. Having to manually complete at the moment with conditional formatting!

Can someone help please?
 

Attachments

  • Bonus Test.JPG
    Bonus Test.JPG
    100.6 KB · Views: 15

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
a countifs() may work
how do you know the date

what are you using in conditional formatting

what are the possible entries for sickness - you have red and orange highlighted

something like
COUNTIFS( RANGE of employes , employee to look for , range of codes , "*"&"SICK"&"*")

or you can , include in a list of employees

Book11
ABCDEF
1
2name1Workingname10
3name2Workingname21
4name3Workingname30
5name1Working
6name2sick
7name3Working
8name1Working
9name2Working
10name3Working
Sheet1
Cell Formulas
RangeFormula
E2:E4E2=UNIQUE(B2:B10)
F2:F4F2=COUNTIFS(B2:B10,E2,C2:C10,"*"&"sick"&"*")
Dynamic array formulas.


OR combined with an IF()

Book11
ABCDEF
1
2name1Workingname1 
3name2Workingname2Off Sick
4name3Workingname3 
5name1Working
6name2sick
7name3Working
8name1Working
9name2Working
10name3Working
Sheet1
Cell Formulas
RangeFormula
E2:E4E2=UNIQUE(B2:B10)
F2:F4F2=IF(COUNTIFS(B2:B10,E2,C2:C10,"*"&"sick"&"*")>0,"Off Sick","")
Dynamic array formulas.


Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet. Plus we cannot see any of the formulas used.

Therefore -

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
 
Upvote 0
Thank you I will try these. Apologies for the photo company restrictions on my laptop would not allow me to add file. I will look to see if I can share the data with you.

The range is looking at a whole month (April) and it needs to show if an employee has a sickness or unauthorized absence then they are ineligible.

Thanks for taking the time to help. Really is appreciated ☺️
 
Upvote 0
the countifs() will work
But just need all the possible codes for
sickness or unauthorized absence

so you could add a couple of countifs() together , if there is no common part of the code

no dates then in the file - the data is only for a month anyway
so a countif() would work

=countif(range, "sickness or what ever the text is")+countif(range, "unauthorized absence or what ever the text is")
 
Upvote 0
a countifs() may work
how do you know the date

what are you using in conditional formatting

what are the possible entries for sickness - you have red and orange highlighted

something like
COUNTIFS( RANGE of employes , employee to look for , range of codes , "*"&"SICK"&"*")

or you can , include in a list of employees

Book11
ABCDEF
1
2name1Workingname10
3name2Workingname21
4name3Workingname30
5name1Working
6name2sick
7name3Working
8name1Working
9name2Working
10name3Working
Sheet1
Cell Formulas
RangeFormula
E2:E4E2=UNIQUE(B2:B10)
F2:F4F2=COUNTIFS(B2:B10,E2,C2:C10,"*"&"sick"&"*")
Dynamic array formulas.


OR combined with an IF()

Book11
ABCDEF
1
2name1Workingname1 
3name2Workingname2Off Sick
4name3Workingname3 
5name1Working
6name2sick
7name3Working
8name1Working
9name2Working
10name3Working
Sheet1
Cell Formulas
RangeFormula
E2:E4E2=UNIQUE(B2:B10)
F2:F4F2=IF(COUNTIFS(B2:B10,E2,C2:C10,"*"&"sick"&"*")>0,"Off Sick","")
Dynamic array formulas.


Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet. Plus we cannot see any of the formulas used.

Therefore -

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
I have created a google worksheet and set to share via this link
the countifs() will work
But just need all the possible codes for
sickness or unauthorized absence

so you could add a couple of countifs() together , if there is no common part of the code

no dates then in the file - the data is only for a month anyway
so a countif() would work

=countif(range, "sickness or what ever the text is")+countif(range, "unauthorized absence or what ever the text is")
Thank you. Here is a link to the doc Attendance Bonus I have changed the names to unique ID's

I will try the above suggestion.
 
Upvote 0
I have created a google worksheet and set to share via this link

Thank you. Here is a link to the doc Attendance Bonus I have changed the names to unique ID's

I will try the above suggestion.
The following is working =IF(COUNTIFS(B$1:B$1000,B3,C$1:C$1000,"*"&"sick"&"*")>0,"Not Eligible","Eligible") how can I add in the following conditions for additonal range:

Unauthorized, Maternity, Dependents, No Call No Show.

Thanks for your help so far. You have been amazing
Dan
 
Upvote 0
oh sorry , i was working on a list solution for you and didnt post dah!!!

=UNIQUE(A1:A1000)

pulls across all the unique ID - note its a 2021/365 function , you have a list of different versions

then this will look in the list of codes in F2 to F9 and then count if they exist in the range B

=SUMPRODUCT(--(COUNTIFS($A$1:$A$1000,D2,$B$1:$B$1000,$F$2:$F$9)>0))

so all you need to do is add to that list - but also change the range in the F range of sumproduct

i notice it has in f2:f9 the same text twice - so hence why you are getting a count of 2
200380089

UK Sick Unpaid
UK Sick Partial Unpaid
UK Statutory Sick Pay
UK Unauthorized Absence Unpaid
UK Maternity
UK Dependents Leave
UK Sick Partial Unpaid
UK No Call No Show


Attendance Bonus .xlsx
ABCDEF
1ID:Pay CodeID:Ineligible reasons = RED
2200614843UK FC Vacation VTO Paid2006148430UK Sick Unpaid
3200614843UK Night Shift Premium1114551971UK Sick Partial Unpaid
4200614843UK Overtime2008217560UK Statutory Sick Pay
5200614843UK Overtime Double2005575480UK Unauthorized Absence Unpaid
6200614843UK Scheduled Work2007729350UK Maternity
7200614843UK Vacation Paid2003951940UK Dependents Leave
8111455197UK Carryover Leave2003800892UK Sick Partial Unpaid
9111455197UK Night Shift Premium1116626840UK No Call No Show
10111455197UK Overtime1128513270
11111455197UK Overtime Double1079306810
12111455197UK Scheduled Work2003800570
13111455197UK Sick Unpaid2003616040
14200821756UK FC Vacation VTO Paid1130380460
15200821756UK Night Shift Premium2007620870
16200821756UK Overtime1081793010
17200821756UK Overtime Double1100471121
18200821756UK Scheduled Work2005706270
19200821756UK Vacation Paid1109542591
20200557548UK FC Vacation VTO Paid1119470710
21200557548UK Scheduled Work1113066803
22200557548UK Voluntary Time Off2012974050
Sheet1
Cell Formulas
RangeFormula
D1:D197D1=UNIQUE(A1:A1000)
E2:E22E2=SUMPRODUCT(--(COUNTIFS($A$1:$A$1000,D2,$B$1:$B$1000,$F$2:$F$9)>0))
Dynamic array formulas.


dropbox file - only available for a few days
 
Upvote 0
oh sorry , i was working on a list solution for you and didnt post dah!!!

=UNIQUE(A1:A1000)

pulls across all the unique ID - note its a 2021/365 function , you have a list of different versions

then this will look in the list of codes in F2 to F9 and then count if they exist in the range B

=SUMPRODUCT(--(COUNTIFS($A$1:$A$1000,D2,$B$1:$B$1000,$F$2:$F$9)>0))

so all you need to do is add to that list - but also change the range in the F range of sumproduct

i notice it has in f2:f9 the same text twice - so hence why you are getting a count of 2
200380089

UK Sick Unpaid
UK Sick Partial Unpaid
UK Statutory Sick Pay
UK Unauthorized Absence Unpaid
UK Maternity
UK Dependents Leave
UK Sick Partial Unpaid
UK No Call No Show


Attendance Bonus .xlsx
ABCDEF
1ID:Pay CodeID:Ineligible reasons = RED
2200614843UK FC Vacation VTO Paid2006148430UK Sick Unpaid
3200614843UK Night Shift Premium1114551971UK Sick Partial Unpaid
4200614843UK Overtime2008217560UK Statutory Sick Pay
5200614843UK Overtime Double2005575480UK Unauthorized Absence Unpaid
6200614843UK Scheduled Work2007729350UK Maternity
7200614843UK Vacation Paid2003951940UK Dependents Leave
8111455197UK Carryover Leave2003800892UK Sick Partial Unpaid
9111455197UK Night Shift Premium1116626840UK No Call No Show
10111455197UK Overtime1128513270
11111455197UK Overtime Double1079306810
12111455197UK Scheduled Work2003800570
13111455197UK Sick Unpaid2003616040
14200821756UK FC Vacation VTO Paid1130380460
15200821756UK Night Shift Premium2007620870
16200821756UK Overtime1081793010
17200821756UK Overtime Double1100471121
18200821756UK Scheduled Work2005706270
19200821756UK Vacation Paid1109542591
20200557548UK FC Vacation VTO Paid1119470710
21200557548UK Scheduled Work1113066803
22200557548UK Voluntary Time Off2012974050
Sheet1
Cell Formulas
RangeFormula
D1:D197D1=UNIQUE(A1:A1000)
E2:E22E2=SUMPRODUCT(--(COUNTIFS($A$1:$A$1000,D2,$B$1:$B$1000,$F$2:$F$9)>0))
Dynamic array formulas.


dropbox file - only available for a few days
Amazing thank you
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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