Link to home
Start Free TrialLog in
Avatar of Sonia Bowditch
Sonia BowditchFlag for Guernsey

asked on

Copy Data to Another Cell Based on Criteria

Dear Experts,

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

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.

Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sonia Bowditch


Perfect.  Thank you.
You're welcome. Glad I could help.