Macro to find a name from a cell and compare to a cell in another worksheet and return the value next to it

Dith2228

New Member
Joined
Jul 1, 2022
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Hi, I have been using =INDEX(Found,MATCH(TRUE,ISNUMBER(SEARCH(HospName,M9)),0)) for excel and it takes so much time to complete. I am not good with macro and in need of help. what I need is from Workseet1 I have details in column A where is contains names which are listed in worksheet1 Column G and has a corresponding value in Column H. I need to search all names from worksheet 2 Col G and if their names appear in worksheet 1 Col A, then Col B will return the corresponding vlaue from worksheet 2 Col H .

Thank you
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Give sample of data, via screenshot, or Xl2BB tool
 
Upvote 0
Give sample of data, via screenshot, or Xl2BB tool
99C80160-6A38-46D4-995F-BADE01ADCC4C.jpeg
 

Attachments

  • 1D3B581B-5A52-4DE8-9875-A3BF8B7A1547.jpeg
    1D3B581B-5A52-4DE8-9875-A3BF8B7A1547.jpeg
    132.3 KB · Views: 21
Upvote 0
B2 in Sheet 1 should have a return value as “Not a member” and B3 should have “member”

Many thabks
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
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