VBA Question

tcalas

New Member
Joined
Mar 7, 2022
Messages
4
Office Version
  1. 2021
How can I create a macro that will take user input data and lookup that input in another workbook and return all columns and rows that are associated with the selection in your main worksheet?
For example, if the user prompts Nbr1 it should return all the columns for the rows containing Nbr1 in the below workbook.

Wong1.xlsx
ABCDEFGH
1iddaysdurationsexagepiqviq
2Nbr13358304Male20.670778789
3Nbr135351617Male55.288169577
4Nbr13547401Male55.9151395116
5Nbr135921310Male61.664615973
6Nbr13728196Male30.127316773
7Nbr13790133Male57.062297669
8Nbr13807375Male24.676257477
9Nbr13808317Male28.2683191110
10Nbr14253403Male22.6037115110
11104356317Male21.399048683
12114384358Male36.380567690
131245422211Female21.957567189
14134705181Female21.68378127109
151447441525Male57.566058285
16154802360Male62.475028897
17164941464Female19.014376988
18174983335Male38.39288102117
19185129261Male25.045867789
Wong
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,071
Latest member
cdnMech

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