Using text input box to call cell values.

mrmatt36

New Member
Joined
Nov 27, 2024
Messages
6
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Looking for info on how to create a text input box on a new sheet that will allow user to input a part number hit a button and have it search data on another sheet and retrieve/display the data related to this item from the other cells.

example- sheet one will have all the part information, column a on sheet one will have the part number, column b will have part name, column c will have part vendor, column d will have the location.
sheet 2 will simply have a text input box with a label - "Input part number to lookup" then have a button "lookup" or "reset" reset will just clear the text box, when you hit lookup it will search column a on sheet one for a match, if matching part number is found it will populate the data for this part from columns a, b, c,& d from sheet one to information box on sheet 2 (same sheet where part number is entered). the text input box and the populated information should be on fixed fields on sheet 2 not a popup box.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Here is one option:
Book1
ABCDEFGH
1
2John's Hardware
3Part Lookup
4
5
6Part Number
755531
8
9
10
11
12Part Number:55531
13
14Part Name:1/4" stainless washer
15
16Vendor:Vendor #1
17
18Location:Box 42
19
Sheet2
Cell Formulas
RangeFormula
E12E12=XLOOKUP(C7,Sheet1!$A$2:$A$10,Sheet1!$A$2:$A$10,IF(C7="","","Item Not Found"))
E14E14=XLOOKUP(C7,Sheet1!$A$2:$A$10,Sheet1!$B$2:$B$10,"")
E16E16=XLOOKUP(XLOOKUP(C7,Sheet1!$A$2:$A$10,Sheet1!$C$2:$C$10,""),Sheet3!A2#,Sheet3!B2:B4,"")
E18E18=XLOOKUP(C7,Sheet1!$A$2:$A$10,Sheet1!$D$2:$D10,"")


With a new table on sheet 3:
Book1
AB
1Unique VendorMask
2national stainless productsVendor #1
3grip rite fastenersVendor #2
4national toolingVendor #3
Sheet3
Cell Formulas
RangeFormula
A2:A4A2=UNIQUE(Sheet1!C2:C10)
B2:B4B2=BYROW(A2#,LAMBDA(rw,"Vendor #"&ROW(rw)-1))
Dynamic array formulas.
 
Upvote 0
I replicated your data (below). I created a UserForm (attached picture) that opens with Workbook Open event. As long as all of your Sheets are formatted like my picture, the form will work with any ActiveSheet. If you're interested, I can share the UserForm and Module.
PartForm.xlsm
ABCD
1Part NumberDescriptionVendorLocation
2555311/4" Stainless WasherNational Stainless ProductsBox 42
3555325/16" Stainless WasherNational Stainless ProductsBox 43
4555333/8" Stainless WasherNational Stainless ProductsBox 44
5555341/2" Stainless WasherNational Stainless ProductsBox 45
6555351" Drywall ScrewsGrip Rite FestenersBay3 - #13
7555361-1/4" Drywall ScrewwGrip Rite FestenersBay3 - #14
8555371-5?8 Drywall ScrewsGrip Rite FestenersBay3 - #15
9555386-32x3/4" Machine ScrewsNational ToolingShelf 23
10555396-32x1" Machine ScrewsNational ToolingShelf 24
Sheet1

1732755446377.png
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,136
Members
452,890
Latest member
Nikhil Ramesh

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