VLOOKUP with multiple conditions

rob5497

New Member
Joined
Dec 31, 2015
Messages
27
Hi, I'd be grateful if I could secure some help on this please...I've been struggling with it :(...

I have a database spread over several sheets, each containing data attributable to employees. One sheet contains "Training Data", the other "Absence Data" and another "Personal Data". I have a master sheet that combines all of the elements on these sheets together to produce an overall record for the employee. I've used VLOOKUP to successfully combine most of the data thus far, using the unique identifier of the "Employee Number".

On the "Absence Data" worksheet, I am able to obtain the total number of episodes of absence for a particular employee. However, I am having difficulty in extracting the number of absences for a particular employee for a particular reason (in this case "S10 Anxiety/stress/depression/other psychiatric illnesses"). Ideally I'd like to be able to search for just the reason code for absence rather than the full text, ie S10.

The "Employee Number" exists in A2 on the master sheet and in C2 on the "Absence Data". The "Absence Data" worksheet has a range of A2:AE13068 so there's a lot of data there. The specific absence reasons are recorded in Column E. I've tried a combination of COUNTIFS, VLOOKUP. One of my rudimentary formulas is below, but it just returns a blank. removing the IFERROR statement, returns #VALUE!

=IFERROR(COUNTIFS('Absence Data'!$A2:$AE13068,$A2,'Absence Data'!E:E,"*S10*"),"")

Can you please help me shed some light on this please.

Many thanks

Rob
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
With a bit more thought, I think I've sorted it...

=COUNTIFS('Absence Data'!$E2:$E13068,"*S10*",'Absence Data'!$C2:$C13068,$A2)

:)(y)
 
Upvote 0

Forum statistics

Threads
1,215,694
Messages
6,126,252
Members
449,305
Latest member
Dalyb2

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