Returning a text value that matches 2 conditions

Pauljj

Well-known Member
Joined
Mar 28, 2004
Messages
2,047
I have worked this out how to return a numerical value but not a text value

In column B is the employees payroll number, in column G is the date they start their leave and in column H is when they finish their leave

On another sheet Is 'Employee A's payroll number in cell E5 with a date in G4

What I want is, if E5 can be found in Column B and if G4 can be found in column H then it should return the value from column D

The payroll number in B and the dates in column G can appear muliple times, so this should only return a value if both date and payroll number match.. Any ideas please ?
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Try something like:

=INDEX(Sheet1!$D$2:$D$100,MATCH(1,(Sheet1!$B$2:$B$100=E5)*(Sheet1!$H$2:$H$100=G4),0))

Confirmed with Ctrl+Shift+Enter as it's an array formula.

Dom
 
Upvote 0

Forum statistics

Threads
1,214,835
Messages
6,121,880
Members
449,057
Latest member
Moo4247

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