Matching Symbols

rwmill9716

Active Member
Joined
May 20, 2006
Messages
495
Office Version
  1. 2013
Platform
  1. Windows
I have a list of symbols in Tab "TSM_Picks" Col G starting in row 3. In a second Tab "Services" I have rows of information, each row associated with a symbol in Col E. I need a macro that reads each symbol in "TSM_Picks", identifies all the rows associated with the same symbol in "Services" and then copies those rows to a Tab "Results". Note, each symbol in "TSM_Picks" may show up in "Services" zero, one or several times.

Thanks for your help,

Ric
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
What are these "symbols"?
Any chance we could see some small sample dummy data at least for 'TSM_Picks'?
 
Upvote 0
This is what TSM_Picks looks like.


Excel 2010
GHIJK
15/11/2018
2TSM Match with Insider TransactionsPriceInsider Buy (P) or Sell (S)Next Earnings Report DateZacks Rank (Current)
3AAPL$188.59S201808073
4BAH40.85S201805292
5BAX70.52S201807252
6BRKS$29.56S201808012
7CAR$43.40S201808061
8DIOD$32.56S201808142
9ECHO$28.10S201807261
TSM_Picks


This is what Services looks like.


Excel 2010
ABCDEFGH
1Buy(P) Sell(S)P/S dateFile DateCompanySymbolInsiderRelationshipShare Amt.
2S5/22/20185/24/2018 17:12AAC Holdings, Inc.AACCartwright Michael T.director officer 10% owner (Chairman and CEO)100,000
3S5/22/20185/23/2018 16:42American Airlines Group Inc.AALIsom Robert D Jrofficer (President)10,000
4S5/23/20185/25/2018 18:32APPLE INCAAPLSrouji Johnyofficer (Senior Vice President)14,976
5S5/22/20185/24/2018 16:51ABAXIS INCABAXARON KENNETHofficer (Chief Technology Officer)1,533
6S5/18/20185/22/2018 8:04ABAXIS INCABAXSINGH PRITHIPALdirector20,000
7S5/18/20185/22/2018 16:36ACORDA THERAPEUTICS INCACORSabella Lauren Mofficer (Chief Commercial Officer)7,288
8S5/18/20185/22/2018 16:34ACORDA THERAPEUTICS INCACORBLANK BURKHARDofficer (Chief Medical Officer)25,000
9S5/22/20185/24/2018 16:43Advantego CorpADGOGrey Philip F.director officer 10% owner (CEO)10,000
10P5/22/20185/24/2018 16:42Advanced Disposal Services, Inc.ADSWMROZEK ERNEST Jdirector1,500
11P1/19/20185/22/2018 11:59ADT Inc.ADTDale Robert Mofficer (SVP, National Account Sales)8,000
12P1/19/20185/22/2018 11:55ADT Inc.ADTPulliam Ameliaofficer (SVP, Chief Human Resources Off)1,500
13S5/24/20185/25/2018 16:13AMEREN CORPAEELindgren Mark Cdirector other5,500
14P5/23/20185/24/2018 16:21ABERDEEN EMERGING MARKETS EQUITY INCOME FUND, INC.AEFCITY OF LONDON INVESTMENT MANAvarious 10% owner25,600
15S5/22/20185/22/2018 17:59AEHR TEST SYSTEMSAEHRHENDRICKSON DAVID Sofficer (Chief Technology Officer)5,000
Services


Note, none of these match here, but when the Symbols from TSM_Picks matches the Symbol in Services, which can happen multiple times, I want to copy the entire Row in Services to a Tab called Results. Note, the data in Services extends to the O Collumn.
 
Upvote 0
How about
Code:
Sub FltrCopy()
   Dim Ary As Variant
   
   With Sheets("TSM_Picks")
      Ary = Application.Transpose(.Range("G3", .Range("G" & Rows.Count).End(xlUp)).Value)
   End With
   With Sheets("Services")
      If .AutoFilterMode Then .AutoFilterMode = False
      .Range("A1:O1").AutoFilter 5, Ary, xlFilterValues
      .AutoFilter.Range.Offset(1).Copy Sheets("Results").Range("A" & Rows.Count).End(xlUp).Offset(1)
      .AutoFilterMode = False
   End With
End Sub
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
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