All the macro does is
1. Get the name of the CSV file
2. Open the file as a new workbook (wbCSV) and a new active worksheet (wsCSV)
3. Add column headers to wsCSV
4. Add row referance in col 9 to go back to original sort order
At this point THE NEW WORKBOOK that was opened from the CSV should look like this
Capture.JPG
This is NOT the workbook with the macro
5. Then the macro sorts, looks for credits with the same store and date, adds a "9", etc.
6. The the macro sorts back to original order, cleans up wsCSV
7. Saves wbCSV as a CSV file, and then closes without Save the wbCSV
The fact that the WB you sent with the macro has a sheet that looks like this
Capture1.JPG
makes it seem to me like you are making changes to the wrong workbook so that
Set rCSV1 = rCSV.Cells(2, 1).Resize(rCSV.Rows.Count - 1, rCSV.Columns.Count)
fails because there's only data in the first row, OR the CSV file was completely empty
All I can suggest is that you first run the macro in the attached workbook to see if it works
I added some debug MsgBox statements just in case