Advice on CSV import, Filter, and row delete

DiscoSte

New Member
Joined
Feb 17, 2021
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Hi Folks

I have a large csv, and I would like to run a Macro that imports it (say from C:\Test\Test.csv), then allows the user to specify a string via Input Box (or otherwise), and any row not containing that string (in a specific column "G") gets deleted/removed.
I'm having a bit of a nightmare trying to do it with filters, as that leaves the data in there, and I have 6/7 subsequent macros, that seemingly won't play ball if it's filtered.

Any help/advice would be greatly appreciated.
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Use Power Query called Get and Transform Data in your version of Excel. Found on the Data Tab.

Bring your csv file into PQ. When you filter in PQ, it removes the line of data -- not just hides it as in Native Excel. Close and Load the file back to Excel and run your needed macros.
 
Upvote 0
Solution

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,557
Latest member
richa mishra

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