Unsure if I should use Index Match or something else

Elijah_M

New Member
Joined
Jan 10, 2018
Messages
7
Hello everyone,

I've gone through the forums quite a bit to find a solution, but I've been unable to, so forgive me if the answer is already out there.

My issue stems from a payroll question. I need to find a way to match a name on a master table to a payroll detail table. The issue is the name only appears in one cell of the data table, but there are multiple pay categories I need to pull onto the master sheet. Ultimately, I want a formula that will see a name in one cell and add together 5 rows of cells in another column, relative to wherever the name is. I know that is a bit wordy so I've included a sample.

DepartmentEmployeeTypeHoursAmount
AdminJillSal70.673057.69
AdminJillVac00
AdminJillHoliday00
AdminJillSick00
AdminJillBonus00
AdminJillEETax00
AdminJillRegular00
AdminJillOT00

<tbody>
</tbody>

Above is the main table. I'm using a formula an index match formula in the 4th column that looks like this:

{=IFERROR(INDEX('Lookup Table'!$A$1:$D$4,MATCH(1,('Main Table'!B2='Lookup Table'!$A$1:$A$4)*('Main Table'!C2='Lookup Table'!$B$1:$B$4),0),3),0)}
(for the 5th column on the main table, I just changed the index column to 4 to get the needed result)

Below is the Lookup table it is pulling from:
JillSal70.673057.69
EETax00
Sick286.54
Vac14605.77
Bonus00

<tbody>
</tbody>


I need a formula that will find the sick and vac time for Jill as well and populate the main table. Putting Jill in the all the open cells will obviously fix the problem with my formula, but is not feasible when using the actual spreadsheet. Does anyone know how to solve this problem? Thank you all in advance!
 
So just as an update, I think I have it up and working now! I stayed with the original formula for the main table {=IFERROR(INDEX('Lookup Table'!$A$5:$E$142,MATCH(1,('Main Table'!$B2='Lookup Table'!$E$5:$E$142)*('Main Table'!$C2='Lookup Table'!$B$5:$B$142),0),4),0)} , but created the additional column using your formula and am having awesome results! The only issue now is for when people get paid two checks in the same period, but that doesn't happen all that often. Thank you again for the help, I definitely could not have done it without you!
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,214,979
Messages
6,122,560
Members
449,089
Latest member
Motoracer88

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