How To Match & Pick-Up Partial Text From A Cell Conditionally?

xlmaniac

Well-known Member
Joined
Jul 2, 2009
Messages
531
Office Version
  1. 2010
Platform
  1. Windows
Dear All,
I do have a sample data set across A1:D4 as follows:-
[TABLE="width: 392"]
<tbody>[TR]
[TD]Inward Date[/TD]
[TD]Inward Day[/TD]
[TD]Schedule Type[/TD]
[TD]Inward Day-Desired(With Formula)[/TD]
[/TR]
[TR]
[TD]01-Aug[/TD]
[TD]Tuesday[/TD]
[TD]A[/TD]
[TD]Tuesday[/TD]
[/TR]
[TR]
[TD]02-Aug[/TD]
[TD]Wednesday[/TD]
[TD]B[/TD]
[TD]Wednesday [/TD]
[/TR]
[TR]
[TD]04-Aug[/TD]
[TD]Friday[/TD]
[TD]C[/TD]
[TD]Friday[/TD]
[/TR]
</tbody>[/TABLE]

There is another table with the Schedule Type across F1:G4 as follows:-
[TABLE="width: 366"]
<tbody>[TR]
[TD]Schedule Type[/TD]
[TD]Description[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Tuesday, Thursday[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]Monday, Saturday, Wednesday[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]Friday[/TD]
[/TR]
</tbody>[/TABLE]

I am looking at formulae across column D2:D4, which will look at the Inward day(Column B) and then match the schedule type(across column C) with that of the schedule type maintained across F1:G4 and then will populate the day from that.
If there are multiple days mapped under a Schedule Type(Like A &B), the formulae should pick-up the day corresponding day against the inward day.
In case of no matching, it should keep the cell blank under column D.
Pls help.
Thanks
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
In D2 enter and copy down:

=IF(ISNUMBER(LOOKUP(9.99999999999999E+307,SEARCH($B2,INDEX($G$2:$G$4,MATCH($C2,$F$2:$F$4,0))))),$B2,"")

Dear Mr Aladin & Usman,
Thanks a lot for the amazing solution.
It really will save lots of unwanted manual intervetion.
My heartfelt gratitude to both of you.
Proud to be here in this forum.
Regards
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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