Vlookup formula issue - returning multiple values for one lookup value

AndyT88

New Member
Joined
Dec 26, 2021
Messages
4
Office Version
  1. 2019
Platform
  1. Windows
I have the following formula which I am using to return a 'tick' or 'blank' if a 'Sample ID' correlates to a 'Type of Test' across 'The Table Array':

=IF(VLOOKUP(BS2,$BA:$BE,5,FALSE)=$BT$1,"✓","")

BS2 = SAMPLE ID NUMBER/ LOOKUP VALUE
$BA:$BE = THE TABLE ARRAY
$BT$1 = THE TYPE OF TEST

This is working fine. However, an issue arises when a unique 'Sample ID' has more than one test in the table array.

At present the formula will only pickup the first test, in the first row for that sample ID across the array.

How do I adjust the above formula so that it'll return all tests/ multiple values for each unique 'Sample ID'?

I hope this is clear. Please let me know if you need additional information.

Thanks in advance
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
If I'm reading it correctly, try
Excel Formula:
=IF(COUNTIFS($BA:$BA,BS2,$BE:$BE,$BT$1),"✓","")
 
Upvote 0
Solution
Thanks so much Jason.

It works perfectly.

You sir, are a legend.

your help is really appriciated.

Regards
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,847
Members
449,051
Latest member
excelquestion515

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