forensic93
New Member
- Joined
- Jan 14, 2020
- Messages
- 16
- Office Version
- 2016
- Platform
- Windows
Hi all,
Looking to get some expert help as i'm a novice with VBA. I've currently tried searching online and i can't seem to find a macro that can help with what i am trying to do.
Essentially i have large data files with more then 1.6 million lines of data. I currently have a macro which will import this data over multiple pages, but i have found that a lot of my data rows i don't need to import because they have 0 values in them. Essentially only 300,000 of the 1.6 million lines i need to import based on certain criteria. I have previously tried to delete the rows in which certain columns have a 0 but i kept getting memory errors.
So I was wondering if it was possible to import the line of a text file if the data in columns 2, 3, 4, 6 and 7 are not 0. Therefore eliminating the import of all data lines that have a 0 value, and not having to split the data over multiple sheets.
There are 9 columns in each file in which i need all of them, but just using the columns above to specify which lines are of value.
Example of text file is:
1st row - heading, heading, heading, heading, heading, heading, heading, heading, heading
2nd row - 1,0,0,0,0,0,0,0,0
3rd row - 2,0,0,0,0,0,0,0,0
300000 row - 300001, -53,14,27,92,41,82,93,4
etc
Any help would be greatly appreciated.
Looking to get some expert help as i'm a novice with VBA. I've currently tried searching online and i can't seem to find a macro that can help with what i am trying to do.
Essentially i have large data files with more then 1.6 million lines of data. I currently have a macro which will import this data over multiple pages, but i have found that a lot of my data rows i don't need to import because they have 0 values in them. Essentially only 300,000 of the 1.6 million lines i need to import based on certain criteria. I have previously tried to delete the rows in which certain columns have a 0 but i kept getting memory errors.
So I was wondering if it was possible to import the line of a text file if the data in columns 2, 3, 4, 6 and 7 are not 0. Therefore eliminating the import of all data lines that have a 0 value, and not having to split the data over multiple sheets.
There are 9 columns in each file in which i need all of them, but just using the columns above to specify which lines are of value.
Example of text file is:
1st row - heading, heading, heading, heading, heading, heading, heading, heading, heading
2nd row - 1,0,0,0,0,0,0,0,0
3rd row - 2,0,0,0,0,0,0,0,0
300000 row - 300001, -53,14,27,92,41,82,93,4
etc
Any help would be greatly appreciated.