Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default How to select a row to delete

What is the format for selecting a row to delete? The
problem is the row that needs to be deleted will change.
The good news is that the activecell in column A will
always be on the row that needs to be deleted. Is there a
way to go ahead and tell Excel to highlight the row that
the activecell is on and delete? Below is the basic code
for deleing a row, however it specifies the row directly.
What do I need to change?

Rows("1:1").Select
Selection.Delete Shift:=xlUp
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default How to select a row to delete

Hi Jeff,

activecell.entirerow.delete

Some more infomation on deleting rows in the #rows area of
Delete Cells/Rows in Range, based on empty cells, or cells with specific values
http://www.mvps.org/dmcritchie/excel/delempty.htm#rows
--
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Jeff Armstrong" wrote in message ...
What is the format for selecting a row to delete? The
problem is the row that needs to be deleted will change.
The good news is that the activecell in column A will
always be on the row that needs to be deleted. Is there a
way to go ahead and tell Excel to highlight the row that
the activecell is on and delete? Below is the basic code
for deleing a row, however it specifies the row directly.
What do I need to change?

Rows("1:1").Select
Selection.Delete Shift:=xlUp



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
Button, now too thin, cannot select to delete Steve Excel Worksheet Functions 7 March 26th 10 04:47 PM
How to delete a 'Select Box' Bodin Excel Discussion (Misc queries) 1 April 28th 09 01:53 AM
select and delete all blank rows Bill from UniqueAuction.com Excel Discussion (Misc queries) 1 October 11th 05 09:06 PM
Delete Select Targets Dathmar Excel Discussion (Misc queries) 1 August 24th 05 04:36 PM
Conditional Row Select and Delete jagstirling[_5_] Excel Programming 3 September 30th 03 08:46 AM


All times are GMT +1. The time now is 07:11 AM.

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"