VBA code rather than vlookup

bhalbach

Board Regular
Joined
Mar 15, 2018
Messages
221
Office Version
  1. 2016
Platform
  1. Windows
I have a worksheet that I am using vlookup to return values from a table (in the same workbook) based on a value I select in a drop down box in the worksheet...I want to change this up to use VBA and have the tables in a separate workbook.

So essentially...
I select a dropdown box value from a list, this will trigger a search in a separate workbook sheet for the dropdown value. When the value is found I need it to return the data from multiple lines back to the same sheet that I selected from dropdown box.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
We would need more information.
-What is the sheet name containing the drop down list and in which cell is the list?
-What is the name of the search workbook including the extension (xlsx, xlsm)?
-What is the name of the sheet that you want to search?
-Which lines do you want to return and where do you want them returned?
 
Upvote 0
I have a worksheet that I am using vlookup to return values from a table (in the same workbook) based on a value I select in a drop down box in the worksheet...I want to change this up to use VBA and have the tables in a separate workbook.

So essentially...
I select a dropdown box value from a list, this will trigger a search in a separate workbook sheet for the dropdown value. When the value is found I need it to return the data from multiple lines back to the same sheet that I selected from dropdown box.

Hello Mumps...

What are the odds of you replying, you helped me build this workbook & VBA about 10 months ago.
I have to build the workbooks first...I am sure this can be done but I wanted to be sure.

Brent
 
Upvote 0
OK. Just respond in this thread when you're ready to go. :)
 
Upvote 0
Mumps,

Is there a way to have multiple independent worksheet frames within one worksheet that function independently?
 
Upvote 0
I'm not sure what you mean. What are "independent worksheet frames"? Please explain in detail.
 
Upvote 0
Similar to were inserting/embed an excel workbook to Microsoft word...you could use multiple worksheets within a worksheet and the function independently without affecting the others.

ie...1st worksheets has 15 lines and a 2nd worksheet beside it has 5 lines...the 1st worksheet grows to 20 lines, the 2nd worksheet stays at 5 lines but is not affected by the 1st expanding...like an independent window/frame
 
Upvote 0
It depends on how the "1st worksheet" grows. You can easily insert more data in the cells manually but if you insert or delete rows, that would affect the entire sheet.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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