Re: $$Excel-Macros$$ VBA code to delete all unused rows and columns

2010-01-23 Thread Dilip Pandey
Dear Mike, Following code will delete the blank rows and columns as per your requirements:- Sub delRows() Cells(1, 1).Select For n = 1 To Range("a65536").End(xlUp).Row Selection.EntireRow.Select If Application.WorksheetFunction.CountA(Selection) = 0 Then Selection.EntireRow.Delete Else ActiveCell

$$Excel-Macros$$ VBA code to delete all unused rows and columns

2010-01-22 Thread mike
I'm looking to set up some VBA code to delete blank rows and columns that just take up space in spreadsheets that I get from external sources. ie: data is in 1 column(A), rows 1-10, if you place a cursor in A1 and hit end down, you go to cell A64000. So delete all empty columns, then rows, then r