Macro or Formula that Returns a Value Based on Adjacent Cells

OliveTree

New Member
Joined
Oct 24, 2013
Messages
3
I am looking for a formula or a macro that will fill a value in column B if the value in column A is matches any of a set of values.

For example, Mike manages John, Christine and Harriet and Susan manages Bob, Steve and Vicki. I have tried using nested IF formulas and they don't work right, as I have over 200 employees and 12 managers to match (too many conditions for a standard if formula) and the data is column A is dynamic; it's a formula pulling specific raw data from another sheet. I'm well versed with formulas, but still learning a lot of VBA and macros, any help is much appreciated.
Employee
Manager
John
Bob
Steve
Harriet
Christine
Vicki

<tbody>
</tbody>
 

Some videos you may like

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Momentman

Well-known Member
Joined
Jan 11, 2012
Messages
4,066
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Where do you have the information of who matches who? for example Mike manages John: meaning that in column B we should have mike as the manager for John right? But where do you have the raw data and in what format does it appear?
 

Watch MrExcel Video

Forum statistics

Threads
1,123,134
Messages
5,599,914
Members
414,348
Latest member
KloppyM

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
Top