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

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
2,572
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
 

Some videos you may like

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
2,572
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
wow, no replies? have I actually found a subject all you geniuses are not able to answer?
seriously! anyone able to help with this?
 

Watch MrExcel Video

Forum statistics

Threads
1,108,630
Messages
5,523,989
Members
409,553
Latest member
alscno

This Week's Hot Topics

Top