Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello All,
I have obtained the following macros from Chip Pearson's Website which deletes BlankRows.... and it is excellent. Public Sub DeleteBlankRows()'chip PearsonDim R As LongDim C As RangeDim N As LongDim rng As Range On Error GoTo EndMacroApplication.ScreenUpdating = FalseApplication.Calculation = xlCalculationManual If Selection.Rows.Count 1 Then Set rng = SelectionElse Set rng = ActiveSheet.UsedRange.RowsEnd IfN = 0For R = rng.Rows.Count To 1 Step -1 If Application.WorksheetFunction.CountA(rng.Rows(R).E ntireRow) = 0 Then rng.Rows(R).EntireRow.Delete N = N + 1 End IfNext REndMacro:Application.ScreenUpdating = TrueApplication.Calculation = xlCalculationAutomaticEnd Sub But I wish it to run the above macro on all the Sheets in my Workbook. Somethin like. For z = 1 To Sheets.Count ' Sheets(z).Activate ' do Row Deleting here 'Next But I have failed in all experiments.. Can somebody suggest a way of how to implement Chip Pearson's macro to run on all the Worksheets in the Workbook |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need Help Deleting Blank Rows | Excel Worksheet Functions | |||
deleting blank rows | New Users to Excel | |||
Chip Pearson's NewWorkDays formula | Excel Discussion (Misc queries) | |||
Chip Pearson's Forum Etiquette | New Users to Excel | |||
Deleting ALL duplicates using Pearson's code | Excel Worksheet Functions |