Find multiple strings of data in data set and return values if found

Peptide

Board Regular
Joined
Apr 12, 2016
Messages
224
Office Version
  1. 365
Platform
  1. Windows
Hello,
I am looking to see if i can do the following in a formula only. I have a headache from trying so hoping one of you experts can lend a hand i would be grateful. Thanks in advance!

Note

I used cells a,b,c,d,e etc to make the example easy, but I need to be able to use this anywhere in a worksheet. Once I figure it out, I need to be able to cut/paste to other parts of the worksheet.

Logic
Find C1 in data range A1:B5, for each time it finds the value, show the value in column D and E as noted below. When it no longer finds anymore C1, find C2, then C3 etc.

Data Range A1:B5
ABCDE Exact Match 10
BCDEF Exact Match 20
CDEFG Exact Match 40
ABCDE Exact Match 200
CDEFG Exact Match 500

C1=ABCDE
C2=BCDEF
C3=CDEFG
C4=DEFGH

Result looks like this
D1=ABCDE E1=Exact Match 10
D2=ABCDE E2=Exact Match 200
D3=BCDEF E3=Exact Match 20
D4=CDEFG E4=Exact Match 40
D5=CDEFG E5=Exact Match 500
 
You are very welcome Bob. Thanks for your kind remarks. :)

Edit: I just noticed that my D2 formula did not display correctly. The forum software causes a problem when a < sign is followed immediately by a letter. I have edited the formula in my previous post but it seems you must have figured out anyway that the red part here was originally missing from that formula. :)

=IF(ROWS(D$2:D2)<MAX(F$1:F$8),INDEX(C$2:C$8,MATCH(ROWS(D$2:D2),F$1:F$8,1)),"")
 
Last edited:
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Thanks Peter,
I was getting and error and re-looked and saw did see that - not bad for a rookie that I could find the issue! As always thank you for your help!

Bob
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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