Drop Down List

southike

New Member
Joined
Feb 26, 2021
Messages
10
Office Version
  1. 365
Platform
  1. Windows
My work has an excel sheet that we upload to our core system. The sheet has to be in a very specific format. One column is for "account number". I want to create a drop down for the user, but if the drop down merely shows the account number, that does not help them. They need to be able to see the description of the account number as well. For example: 222333444 means nothing to them since they don't have all account numbers memorized. But if the drop down shows "222333444 Insurance Fees", then they would know which account number to select. However, the cell/column can be ONLY a number. It can't include the wording or the upload will fail. Any help is appreciated. Maybe a drop down is not the answer. Thank you.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Yes, this does help. I've created the "helper" column. And I've added the VBA to my sheet, but I'm getting the error "Wrong Entry". I edited the ranges in the VBA code to match mine. The columns are actually the same, just added some more rows. Any reason why I'm getting this error?

Edit: I may have found the problem. It's looking for E2:Ex..., but my "E2:Ex" is on another sheet. How do I edit the VBA to look at my other sheet. The other sheet is called "TABLES".
 
Upvote 0
Edit: I may have found the problem. It's looking for E2:Ex..., but my "E2:Ex" is on another sheet. How do I edit the VBA to look at my other sheet. The other sheet is called "TABLES".
Try changing this part:

VBA Code:
Set c = Range("E2:E11").Find(What:=v, LookIn:=xlValues, lookAt:=xlWhole, MatchCase:=False, SearchFormat:=False)
to this:
VBA Code:
Set c = Sheets("TABLES").Range("E2:E11").Find(What:=v, LookIn:=xlValues, lookAt:=xlWhole, MatchCase:=False, SearchFormat:=False)
 
Upvote 0
You're welcome, glad to help & thanks for the feedback.:)
Is the range "E2:Ex" a fixed range, or is it dynamic , meaning you plan to add new data row later on? If it's dynamic, we'll need to modify the code accordingly.
 
Upvote 0
It is fixed at E2:E21. Shouldn't be changed. But if it ever does change, you're right I'll have to edit that. Thanks for the heads up.
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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