Hey everyone!
I have a csv that I am trying to clean in excel using VBA. If I open the file in notepad, it contains thousands of blank lines after my data ends which shouldn't be there. I want to flag the data and possibly automate deleting these rows in excel (amongst other data cleaning issues).
When I open in excel, there is only 900 rows of actual data. The problem is when I go to write the VBA, any formula I use to count the total number of rows is giving me 900 so I cannot figure out how to detect these extra rows using code.
If I go in manually and select the last row and ctrl+shft+down arrow and then delete, it then deletes the rows and shows that change in notepad. Is this just a problem because it is a csv? Is this an impossible task to automate?
I have a csv that I am trying to clean in excel using VBA. If I open the file in notepad, it contains thousands of blank lines after my data ends which shouldn't be there. I want to flag the data and possibly automate deleting these rows in excel (amongst other data cleaning issues).
When I open in excel, there is only 900 rows of actual data. The problem is when I go to write the VBA, any formula I use to count the total number of rows is giving me 900 so I cannot figure out how to detect these extra rows using code.
If I go in manually and select the last row and ctrl+shft+down arrow and then delete, it then deletes the rows and shows that change in notepad. Is this just a problem because it is a csv? Is this an impossible task to automate?