View Single Post
 
Old 06-16-2017, 01:58 PM
mushtaqkadar mushtaqkadar is offline Windows 7 32bit Office 2010 32bit
Novice
 
Join Date: Jun 2017
Posts: 2
mushtaqkadar is on a distinguished road
Default Excel Index and Match function with multiple criteria not searching the next record

I have a spreadsheet wherein I need to find data based on multiple search criteria. I have used the Index with Match function to find the first record in the spreadsheet however I am unable to get to the next record in the data set.

The file name is "Safety Stats" and the data is in the [Occupational Injuries] tab. I need to find all records where the month is pervious month, the "Employee/Contractor" column is "Employee" and the "Injury Type" column is not "First Aid" or "Reported Only". I want excel to pull data based on my criteria from this spreadsheet into a different excel report every month.

My function is locating the first occurrence however I am unable to find the next record in the data set. Any help will be highly appreciated.

Here is the function I have written.
[code][code][code]{=IF(
ISNA(
INDEX(
'[Safety Stats.xlsx]Occupational Injuries'!$C$5:$C$128,
MATCH(1,
('[Safety Stats.xlsx]Occupational Injuries'!$A$5:$A$128=TEXT(EOMONTH(TODAY(),-1),"MMMM")) *
('[Safety Stats.xlsx]Occupational Injuries'!$F$5:$F$128="Employee") *
('[Safety Stats.xlsx]Occupational Injuries'!$I$5:$I$128<>"First Aid") *
('[Safety Stats.xlsx]Occupational Injuries'!$I$5:$I$128<>"Reported Only"),0))),"",
INDEX('[Safety Stats.xlsx]Occupational Injuries'!$C$5:$C$128,
MATCH(1,
('[Safety Stats.xlsx]Occupational Injuries'!$A$5:$A$128=$Y$9) *
('[Safety Stats.xlsx]Occupational Injuries'!$F$5:$F$128="Employee") *
('[Safety Stats.xlsx]Occupational Injuries'!$I$5:$I$128<>"First Aid") *
('[Safety Stats.xlsx]Occupational Injuries'!$I$5:$I$128<>"Reported Only"),0)))}

Here is the DATA.

MonthDayFull NameYears of ExperienceOccupationEmployee /ContractorLocationDepartmentInjury TypeMay05Bery Owen5WelderEmployees2. MaintenanceMaint ShopMedical Treatment InjuryMay09Samyy Wood3ServicesContractor2. MaintenanceServicesFirst AidMay11Sunny Man4OperationEmployees1. ProductionOperation FacilityMedical Treatment InjuryMay15Rick Richard1OperationEmployees4. OthersPlantLost Time InjuryMay19Patty Westwood6MaintEmployees4. OthersMachineryFirst AidMay21Tim Bear3MaintContractor4. OthersServicesReported OnlyMay24Angela Petterson5MechanicEmployees1. ProductionOperation FacilityFirst AidMay25Martin Butin4TradesmanEmployees1. ProductionOperation FacilityRestricted Work InjuryMay29Roy Mathew6RiggerEmployees1. ProductionOperation FacilityFirst Aid
Attached Files
File Type: xlsx Safety Stats Image.xlsx (10.3 KB, 9 views)
Reply With Quote