Pulling data into a userform, then sending it back to a Sheet updated?

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,194
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi Everbody,

OK I've got a great one for you all?
I have a userform called userform1

I have a list of data in Sheet1 that is customers names addresses ect.
each customer has there own row in the sheet,

I'd like to be able to open the user form select a drop down box with all the customers names on it, pull that data into the form, then when I'm finished updating there details, click submit and have the form update that client row?

I'm ok sorting out the basics such as setting up the form etc. but I'm stuck on the code I'd need to set up the drop down box, pull the data from sheet1 that matches the name I've selected into the form and then send it back to sheet1 on the same row it came from?
I've done a lot of userforms in my time so I'm fairly ok with where you put code etc. just don't know what code to use.

I can probably work out everything I need if I can just get the following information to get me started:

to keep it simple, lets just say i want to pull the customers postcode into userform1 so i can update it then send it back to the cell it came from:

1, the customers names are in Column A, I can get the drop down box to pull the name from the column ok. lets say this data is in "Namebox1" on userform1

2, I need the code to look at the name in Namebox1 and match it to the names in Column A sheet1 (there will be no duplicate names to worry about!) then pull the data from the matching row of column into Textbox1


then upon hit the "submit" button, I need to take the data in textbox one and return it to the cell it came from, replacing any data that might already be in there?

thus update that clients records!

can someone please advise me the code i need and how this can be done?
thank you

Tony
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
wow, no replies? have I actually found a subject all you geniuses are not able to answer?
seriously! anyone able to help with this?
 
Upvote 0

Forum statistics

Threads
1,215,444
Messages
6,124,893
Members
449,194
Latest member
JayEggleton

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