Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to delete rows if cell blank in column puiuluipui Excel Discussion (Misc queries) 4 October 15th 09 05:22 PM
Delete Rows if any cell in Column H is blank but do not Delete Fir manfareed Excel Programming 4 September 28th 07 05:20 PM
Delete entire rows where there is a blank in column A Chris Hankin[_2_] Excel Programming 7 June 11th 06 09:56 AM
To Delete the specific rows when blank is found on column A ddiicc Excel Programming 3 August 5th 05 05:32 AM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM


All times are GMT +1. The time now is 01:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"