VBA code to search Column and enter text box value in the line below

Status
Not open for further replies.

Zimmerman

Well-known Member
Joined
Jan 22, 2009
Messages
663
I have a userform that the user will pick from the combo box list and then enter in a value in a textbox 1. Once the user clicks the OK command button I would like it to search the combo box value in column A on Sheet1 and place the value from textbox 1 in the next available row below in column C on the same sheet.

Column A has values in A7, A21, A35, A49 and so on. There's a value every 14 rows apart all the way down to cell A436.

Example
Combo box value (User picked) = John Doe
Cell A21 has a value of John Doe in sheet1
Textbox 1 value (User entered) = P12
Cell C22 should now be P12

After the OK command button is clicked the combo box and textbox will get cleared and the user can do it again.

Combo box value (User picked) = John Doe
Cell A21 has a value of John Doe in sheet1
Textbox 1 value (User entered) = P45
Cell C23 should now be P45

Thanks in advance
excel 2016
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Status
Not open for further replies.

Forum statistics

Threads
1,223,630
Messages
6,173,454
Members
452,514
Latest member
cjkelly15

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