Deleteing Rows in excel
Solved/Closed
Related:
- Deleteing Rows in excel
- Deleting and combining rows in excel with con ✓ - Forum - Excel
- Macros to Delete Rows in Excel 2007 ✓ - Forum - Programming
- Conditionally deleting rows in excel 2007 ✓ - Forum - Excel
- How to delete all rows except the first header row in excel ✓ - Forum - Excel
- How to delete rows in excel with conditional formatting - Forum - Excel
2 replies
data_encoder
Nov 15, 2010 at 01:08 PM
- Posts
- 13
- Registration date
- Wednesday November 3, 2010
- Status
- Member
- Last seen
- November 15, 2010
Nov 15, 2010 at 01:08 PM
I have a macro that deletes empty columns, and you can designate column A. If you have headers that are blank, I suggest to add some header info just so it doesnt get deleted, eg., if column A starts at row 3 with header info, make sure row 1 and 2 has some info or this gets deleted.
Give this a shot:
Give this a shot:
Sub DeleteEmptyColumns() Dim col As String * 1 col = InputBox(Prompt:="Enter Column: eg. A (for the 1st column)", _ Title:="Enter Column Letter To Delete Blanks", Default:="A") If col = "Enter Column" Or _ col = vbNullString Then Exit Sub Else 'Deletes all rows with empty column col Columns(col & ":" & col).SpecialCells(xlCellTypeBlanks).EntireRow.Delete End If End Sub