ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Delete Blank Rows - specify column via dialog (https://www.excelbanter.com/excel-programming/402009-delete-blank-rows-specify-column-via-dialog.html)

porter444

Delete Blank Rows - specify column via dialog
 
From time to time I have worksheets of data that have rows I want to
eliminate. The rows I want to delete usually have something in common like,
all have a blank value in a specific column.

In the past I have just modified a macro to specify which column I want to
deal with. Like this for column B:
Columns(2).SpecialCells(xlCellTypeBlanks).EntireRo w.Delete

Wondering if there is a way to write a macro that when run would give me a
dialog box and ask which column to look in so I don't have to change the
macro for the different situations.

Logically, something like this:

Columns(DIALOG BOX ENTRY).SpecialCells(xlCellTypeBlanks).EntireRow.De lete

Can you help?

Thanks in advance,

Scott

Ron de Bruin

Delete Blank Rows - specify column via dialog
 
Why not use the column of the active cell ?
Columns(ActiveCell.Column)

See also this page for a possible problem
http://www.rondebruin.nl/specialcells.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"porter444" wrote in message ...
From time to time I have worksheets of data that have rows I want to
eliminate. The rows I want to delete usually have something in common like,
all have a blank value in a specific column.

In the past I have just modified a macro to specify which column I want to
deal with. Like this for column B:
Columns(2).SpecialCells(xlCellTypeBlanks).EntireRo w.Delete

Wondering if there is a way to write a macro that when run would give me a
dialog box and ask which column to look in so I don't have to change the
macro for the different situations.

Logically, something like this:

Columns(DIALOG BOX ENTRY).SpecialCells(xlCellTypeBlanks).EntireRow.De lete

Can you help?

Thanks in advance,

Scott



All times are GMT +1. The time now is 06:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com