Match UserForm Entry with Sheet Data

canarycat123

New Member
Joined
Sep 1, 2021
Messages
26
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi there, I'm looking for a string of code that can accomplish the following:

UserForm
1. UserForm contains two fields, 'Reference No.' and 'Reason'. Both are free text entry.
2. The value that has been entered into 'Reference No.' should then be matched against a range of data in Column A of another sheet.

Match Found
3. The entire row containing the matched reference number should be highlighted in red, then copy and paste 'Reason' into a note (or similar popup - I don't mind how that is achieved) against the matched cell reference (e.g. A4).
4. A message box is then returned to the user advising of successful implementation. The UserForm should then disappear.

No Match Found
4. If no match is found in 'Reference No.' then a message box appears advising of this. A simple of Ok will suffice which then leads back to the 'UserForm'.

I appreciate this is quite lengthy, I've tried everything within my knowledge base (limited!) but have been unsuccessful.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,144,154
Messages
5,722,815
Members
422,460
Latest member
VBA_Noob01

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