Index match multi criteria - help

tonyotter

Board Regular
Joined
Dec 14, 2006
Messages
56
Dear Mr Excel Community,

Hoping once again for you to come to my rescue

I am looking for some help on trying to solve the following index match problem (Although it may be solve with a solution that isn't index/match)
I have tried a number of solutions both array and non-array but with no luck so far.

I have the following in sheet1:
In Colum A are dates beginning 1st December (a2) through to 31st (a32)
In Column B is an employee payroll number (e.g. 11846) the same number through cells B2 to B32
In Column M are values showing the hours worked by the employee on that day (Value can be blank / zero or any number - 2 decimals up to 18)

This pattern then repeats for the subsequent rows with the next employee payroll number - i.e. A33 through to A63 will be dates 1st to 31st again, whilst B33 through B63 will be the next employee ID number.
The pattern runs through all employee ID numbers.

In sheet 2

I have in column A all unique employee ID numbers starting at A2.
In Row 1 I have dates from the first of December (B1) through to 31st December (AF1)

What I need to achieve is in each row next to the unique ID number to lookup the ID number in sheet 1 and the corresponding date in sheet1 and return the hours in column M

Example result to be generated attached.

I hope I have been clear - I have tried various ways as detailed in posts here and elsewhere but cannot get this to work.

Greatly appreciate any help
 

Attachments

  • sheet1.PNG
    sheet1.PNG
    19.1 KB · Views: 5
  • sheet 2.PNG
    sheet 2.PNG
    6.2 KB · Views: 5
  • example output.PNG
    example output.PNG
    7 KB · Views: 4

Some videos you may like

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,574
Office Version
  1. 365
Platform
  1. Windows
I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

How about, in B2 dragged down & across
Excel Formula:
=SUMIFS(Sheet1!$M:$M,Sheet1!$B:$B,$A2,Sheet1!$A:$A,B$1)
 

Watch MrExcel Video

Forum statistics

Threads
1,127,653
Messages
5,626,105
Members
416,161
Latest member
David1966Lewis

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
Top