Filter copy and text to columns Delimiter VBA

thelad

Board Regular
Joined
Jan 28, 2011
Messages
245
Hi,

I was wondering if someone could help me with macro I have. I have some code that copies a sheet onto another workbook. I would like to do some manipulation then on this data. Can anyone help? The following is what I would like to do:

  • Put a filter in row 14 on DFS TAB
  • Filter anything that has ABC123 in column E and select from row 14 down to end and paste in ABC123 tab (Copy visiable cells only once filtered)
  • On ABC123 Tab copy column E to L
  • Select L2 down to last used row
  • Then do text to columns, select delimited, then have tab and space as the delimeters

I appreciate if anyone could help?

Regards,
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
How about
Code:
Sub filterT2C()
   Dim Dfs As Worksheet
   Dim Abc As Worksheet
   
   Set Dfs = Sheets("DFS")
   Set Abc = Sheets("ABC123")
   If Dfs.AutoFilterMode Then Dfs.AutoFilterMode = False
   Dfs.Range("A14:K14").AutoFilter 5, "*ABC123*"
   Dfs.AutoFilter.Range.Copy Abc.Range("A1")
   Abc.Range("E:E").Copy Abc.Range("L1")
   Abc.Range("L:L").TextToColumns Destination:=Range("L1"), DataType:=xlDelimited, _
      TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=True, _
      Semicolon:=False, Comma:=False, Space:=True, Other:=False
End Sub
 
Last edited:
Upvote 0

Forum statistics

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