Best approach for 'Cleaning' Multiple Excel Files

EmmaP

New Member
Joined
Apr 13, 2017
Messages
3
Hi everyone,

I am having a lot of issues with the best method to use for 'cleaning up' my data files in Excel.

I currently have 20 files with 10 sheets each to process.

I am trying to ---- Take an original sheet and copy it over to another sheet - which will include the 'cleaned' version of the data. The excel file that looks like the following below, but with many more applications
Application TypeApplication DecisionTotalTitleAddressRef Number
AllAll245xxxxxxxxx
xxxxxxxxx
Appeal Allowed0
Approved0
Deemed Permission1 xxxxxxxxx
Deemed Refused0
Granted211xxxxxxxxx
xxxxxxxxx
Conservation AreaAll0

<tbody>
</tbody>

The goal of this part is to copy the data over but eliminate the rows with a Decision value of zero. There are unfortunately multiple application types, some of which will have a zero value, but I need to keep these in. So the cleaned version of the table would look something like below,
Application TypeApplication Decision TotalTitle AddressRef Number
AllAll245 xxxxxxxxx
xxxxxxxxx
Deemed Permission1xxxxxxxxx
Granted211xxxxxxxxx
Conservation AreaAll0

<tbody>
</tbody>


If you have any idea on how best to automate this I would apperciate this!
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
It really depends on which rows you'd like to keep. What are the criteria for rows with Decision values of zero you'd like to keep?
 
Upvote 0
I would like to keep All of the rows which have a label under the 'Application Type' even if their 'Application Decision' is a zero, but would like to get rid of the rows which just have an 'Application Decision' .
 
Upvote 0
Code:
Sub row_delete()

With Workbooks("[B]NAME[/B]").Worksheets([B]NUMBER[/B])
    'find last row
    LastRow = .Range("C" & Rows.Count).End(xlUp).Row
    x = LastRow
    For Each Cell In .Range("C1:C" & x)
       If Cell.Value = "0" And Cell.Offset(0, -2) = "" Then
            Cell.EntireRow.Delete
       End If
   Next
End With

End Sub
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,370
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top