Look and return exact match

ashani

Active Member
Joined
Mar 14, 2020
Messages
347
Office Version
  1. 365
Platform
  1. Windows
Hi everyone

I wonder if someone could pls help me - I’m looking for the formula that extract and return exact match albeit it’s a same value. For example :

ABCD 1
FGH 2
ABCD 3
XYZ 2
ABCD 4

I want to look up alphabets and return numbers. I tried using xlookup but as some have same values but with different numbers I’m not getting the correct return

Your help will be much appreciated

Thank you
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Match, VLOOKUP, HLOOKUP only get the first instance and no further.
You may want to consider the FILTER Function which will return multiple records.
Excel Formula:
=FILTER(A1:B4,A1:A4 = "ABCD","")

(I manually typed that, so it may not be accurate, the online documentation on FILTER is good.)
 
Upvote 0
Thank you for your help but it's not working unfortunately
 
Upvote 0
Not sure what you want. I was thinking this:
Book1
ABCDE
1TargetReturn
2ABCD1ABCD1
3FGH2ABCD3
4ABCD3ABCD4
5XYZ2
6ABCD4
Sheet2
Cell Formulas
RangeFormula
D2:E4D2=FILTER(A2:B6,A2:A6="ABCD","")
Dynamic array formulas.
 
Upvote 0
Thank you @awoohaw
sorry I think I didn't explain properly, so there's 2 conditions - the top one in Cell C2 is static and Target in A5 onwards are not static - here's the screenshot :

1677888431055.png
 
Last edited:
Upvote 0
123 isn't anywere in the matrix. I'm not sure what you want to get from that? Can you elaborate more?
Where are you matching 123?
 
Upvote 0
The Target and Return is from formulas, not sure if filter will work as I tried using :

=FILTER(A2:B9,(A2:A6="ABCD")*(b2:B9="123")) and it come up as #N/A
 
Upvote 0
The Target and Return is from formulas, not sure if filter will work as I tried using :

=FILTER(A2:B9,(A2:A6="ABCD")*(b2:B9="123")) and it come up as #N/A
you are missing the 3rd argument of the FUNCTION.
 
Upvote 0
Book1
ABCDEFGH
1Target 1ABCD
2Target 2123
3
4Target1Target2Return
5ABCD1231ABCD1231
6FGH4562ABCD1234
7ABCD7893
8XYZ6542
9ABCD1234
Sheet2
Cell Formulas
RangeFormula
E5:G6E5=FILTER(A5:C9,(A5:A9=B1)*(B5:B9=B2),"")
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,216,753
Messages
6,132,514
Members
449,731
Latest member
dasda34

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