Help with Macro

B.Kellough

Board Regular
Joined
Aug 1, 2009
Messages
180
Macro2 Macro
'
'
Range("A2").Select
ActiveCell.FormulaR1C1 = (a2)
ActiveSheet.Range("$A$4:$I$337").AutoFilter Field:=1, Criteria1:=(a2)
End Sub

Does anyone know how to change this macro; so that it if I put a id in cell "A2" and activate the macro, it will look down the ("$A$4:$I$337") range and bring back all of the data in cell "B:J" and display it in A3:J3?

Thanks for any help.
 

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.
So, this is the VLOOKUP function in Excel, right?
 
Upvote 0
Yes; but the problem is that in some inatnces there are two or more of the ID's and I would need to be able to pull back all of the data for each of the same ID's.
 
Upvote 0
Why would you want to copy the results of the autofilter? They're visible, no?
 
Upvote 0
Because we are working with several sheets and it would be simpliar to copy the ID from one and have it automatically pull up the data for us.
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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