Hi All,
I have a workbook, with a worksheet "Summary". In this worksheet "Summary" I would like to delete all columns that have less than 100 rows. Please see the attached file
Thanks in advance for your help.
Hi All,
I have a workbook, with a worksheet "Summary". In this worksheet "Summary" I would like to delete all columns that have less than 100 rows. Please see the attached file
Thanks in advance for your help.
Sub a() Lastcol = Cells(3, Cells.Columns.Count).End(xlToLeft).Column For col = Lastcol To 2 Step -1 If Cells(Rows.Count, col).End(xlUp).Row < 100 Then Columns(col).Delete End If Next End Sub
If solved remember to mark Thread as solved
Maybe:
Sub TallOne() Dim i As Long For i = 22 To 2 Step -1 If Cells(Rows.count, i).End(3)(1).Row < 100 Then Columns(i).Delete Next i End Sub
Hi patel45,
it works perfectly thanks again.
I have another questions (but not sure should I asked here or open a new thread). In the same file after deleting all the columns that have number of rows <100. I would like to sort the data according to column (D, G, J, ....).
Thanks again
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks