Retrieve cell data to a Form text box

Stusouth

New Member
Joined
Dec 5, 2021
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Sorry if this has been asked before.

What I'm trying to achieve is this. Based on a Dropdown box in a Form, select a Sku reference. Based on this reference then pull into another text box the Sku Description which is saved in a cell within my worksheet. My Sku references are in "A" and Descriptions in "B".

I've got a separate form to be able to save down new Sku's and there descriptions, but drawing a complete black at retrieving data. can anyone help.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Hi Stu,

Assuming your Dropdown box & Textbox is Combobox1 & Textbox1

Maybe try
VBA Code:
Dim totrows As Long, i As Long

'Userform Textbox update Description on Combobox1
totrows = Worksheets("Sheet1").Range("A2").CurrentRegion.Rows.Count

For i = 2 To totrows
    If Trim(Sheet1.Cells(i, 1)) = Trim(ComboBox1.Value) Then
       TextBox1.Text = Sheet1.Cells(i, 2)
       Exit For
    End If
Next i
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,871
Members
449,054
Latest member
juliecooper255

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