Index match & only index/return certain text

Kirstym1918

New Member
Joined
Dec 17, 2017
Messages
45
Hi guys,

So I've created this formula below and its looking up a name for a match then returning the data from the cell next to it which is a rota'd work day so W or H or whatever else has been added to the rota (could be a variation on text at any one time)

Its looking in two columns which is why I've had to use the IFERROR formula with it (If its not in BB column then look in BE for match)

=IFERROR(INDEX(Mon!$BC$5:$BC$500,MATCH(FTE!$B3,Mon!$BB$5:$BB$500,0)),IFERROR(INDEX(Mon!$BF$5:$BF$500,MATCH(FTE!$B3,Mon!$BE$5:$BE$500,0)),""))

Is there a way for restricting what data the INDEX returns?

So I only want INDEX to return the data if it equals "H", "W" or "S" and leave blank if it is not equal to any of these.

Any ideas? :confused:

Many Thanks
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Provided your formula works fine then this maybe:

=IFERROR(IF(OR(IFERROR(INDEX(Mon!$BC$5:$BC$500,MATCH(FTE!$B3,Mon!$BB$5:$BB$500,0)),INDEX(Mon!$BF$5:$BF$500,MATCH(FTE!$B3,Mon!$BE$5:$BE$500,0)))={"H","W","S"}),IFERROR(INDEX(Mon!$BC$5:$BC$500,MATCH(FTE!$B3,Mon!$BB$5:$BB$500,0)),INDEX(Mon!$BF$5:$BF$500,MATCH(FTE!$B3,Mon!$BE$5:$BE$500,0))),""),"")
 
Upvote 0

Forum statistics

Threads
1,213,538
Messages
6,114,218
Members
448,554
Latest member
Gleisner2

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