Find if value exists in multiple occurence

inabanana

New Member
Joined
Jun 4, 2018
Messages
2
I need help! I have two columns. Column A is a list of position ID and there are multiple rows for one value. Column B contains a corresponding org unit ID such that each position ID can have 3 to 5 org unit IDs linked to it. I have identified a list of org units that will be tagged as central function.

I need to check if a position has any org unit attached to it tagged as central function and return to me that org unit id in the third column

Column A Column B
12345 123
12345 234
23456 123
23456 234

123 is a central function so i need a formula that will get me the table below


Column A Column B Column C
12345 123 123
12345 234 123
23456 123 123
23456 234 123


I've tried using an array and max function by assigning a value to the central org unit but i'm stuck. Can anyone please help? :(
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Does this work for you?

=IF(ISNUMBER(MATCH($B2,CentralFunctionList,0)),$B2,VLOOKUP($A2,$A$1:$C1,2,0))



Thank you for your response. However, I am getting an error as it is giving me only the value for the first record if the org unit is not in the Central Function List. :(
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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