I have a .CSV file emailed to me each morning which I import into a Excel spreadsheet for analysis. Since the application creating the file has been upgraded the formatting of the file has gone a bit wobbly.
For the some rows, data has blank cells between it and the next set of data.
I am trying to write a macro which look at the data and cut and paste data to another cell if it encounters a blank cell. Once this criteria is no longer met, end the macro run.
Very (very) basic if statement I had written as a test to get all of the data into columns A:E:
If Range("C11") = "" Then
Range("E11").Select
Selection.Cut
Range("C11").Select
ActiveSheet.Paste
Else
MsgBox "Not blank"
End If
Attached is an example of formatting I am struggling with.
Any help you could give me would be greatly appreciated.
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.