I have been trying myself to find a solution based on couple of codes i have found on net.
basically what i need is
i have more than 50 tables in many worksheets on my workbook.
each of the tables have empty rows and empty columns.
some empty columns or rows are in between and some are at the end of the data.
now what i need is that for all of these tables, i want the delete operation to start from #x number of rows or columns and this #x numbe r of row and columns should be given by inputbox by user.
so in more simple way.
when i run the macro.
it should ask me via inputbox to enter the number of starting ROW on tables based on where the delete of empty cells should start
then it asks me via inputbox to enter the number of starting COLUMN on tables based on where the delete of empty cells should start.
after that it loops through all of the tables in active workbook and deletes the empty rows and columns.
for example if on first inputbox i put 4 and next inputbox i put 3 then macro should start checking the empty cells from row 4 and from column 3
for your convenience, i have uploaded a dummy file.
also the below codes from net, which i could not modify to get it worked.
Public Sub DeleteLastRow()
Const DELETE_ONLY_IF_BLANK = True ' This flag if set to FALSE will ensure a non-blank row is also deleted
Const CHECK_ONE_COLUMN_LESS = True ' This flag if set to TRUE will delete only if all columns are blank
Dim oLst As ListObject
Dim Number_of_rows As Long
Dim Number_of_columns As Integer
Application.ScreenUpdating = False
For Each oLst In ActiveSheet.ListObjects
If .Name = "Table3" Then ' Change the table name to suit
Number_of_columns = .ListColumns.Count
Number_of_rows = .ListRows.Count
If Number_of_rows > 1 Then
If DELETE_ONLY_IF_BLANK Then
If Application.WorksheetFunction.CountBlank(.ListRows(Number_of_rows).Range.Offset(, 1).Resize(, Number_of_columns + 1 * CHECK_ONE_COLUMN_LESS)) = Number_of_columns + 1 * CHECK_ONE_COLUMN_LESS Then
Application.ScreenUpdating = True