I am curious.
* How is your data set up on the worksheet?
* What is the purpose of selecting only cells with data?
* What happens to those cells with no data?
* How do you want your output in terms of column / row?
Hello
-The sheet is using a macro to pull data from another sheet. Users will download a report from one application, copy the data from that report, and paste it into the workbook. I built a macro to extract the data from that report and format it correctly so they can use it to upload it into a different application to create a request for something.
-I won't know the number of rows each individual user will put into the sheet that I am trying to save as CSV. It will be different every time and they will start over every time.
-I have a macro that trims all lines below the last row with data on the sheet. Sometimes, the application that we upload to will error if there are empty rows in the CSV that has/used to have data; even if it's phantom data.
-The output should just be pasted into cell A1 in a new workbook. This new workbook would then be saved as CSV as the file name and location chosen by the user.
I will note, the upload sheet will always have the same number of columns but there will be a different number of rows each time. No more than probably 500 rows at the max. Most of them will be like the image I uploaded. Anywhere from 1-30 rows.
I can't use the upload mini-sheet feature so here is a picture of the sheet I would like to export as CSV. Sheet is titled "Upload".