Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Deleting range not a row

I have a workbook with data in columns A:N and I need to be able to
delete any blank part rows in columns A:G without disturbing the data in
columns H:N.
How do I delete ranges, eg A12:G12 where A12 is blank, without deleting
the remaining part of the row - H12 onwards?
I know how to delete individual blank cells or entire rows where a cell
is blank but not part rows.
Grateful for any suggestions.
--
Robert
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Deleting range not a row

Range("A12:G12").Delete Shift:=xlShiftup


--
Regards,
Tom Ogilvy


Robert wrote in message ...
I have a workbook with data in columns A:N and I need to be able to
delete any blank part rows in columns A:G without disturbing the data in
columns H:N.
How do I delete ranges, eg A12:G12 where A12 is blank, without deleting
the remaining part of the row - H12 onwards?
I know how to delete individual blank cells or entire rows where a cell
is blank but not part rows.
Grateful for any suggestions.
--
Robert



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Deleting range not a row

My original query was not clear - I want to delete all part rows in
columns A:N where the cell in column A is blank without selecting each
part row individually. The following will delete complete rows;
Range("A3:N1000").Select
Selection.SpecialCells(xlCellTypeBlanks).EntireRow .Delete
but I don't know how to restrict the deletions to columns A:N.

Robert

In message , Tom Ogilvy
writes
Range("A12:G12").Delete Shift:=xlShiftup


--
Regards,
Tom Ogilvy


Robert wrote in message ...
I have a workbook with data in columns A:N and I need to be able to
delete any blank part rows in columns A:G without disturbing the data in
columns H:N.
How do I delete ranges, eg A12:G12 where A12 is blank, without deleting
the remaining part of the row - H12 onwards?
I know how to delete individual blank cells or entire rows where a cell
is blank but not part rows.
Grateful for any suggestions.
--
Robert





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Deleting range not a row

Many thanks

Robert

In message , Tom Ogilvy
writes
Your original query was clear and I answered the question you asked. If
your question now is how to implement this for the range

Sub DeleteRows()
Range("A3:N30").Select
Selection.SpecialCells(xlCellTypeBlanks) _
.EntireRow.Select
Intersect(Selection, Columns("A:N")).Select
Selection.Delete shift:=xlShiftUp
End Sub

Gets the job done.

--
Regards,
Tom Ogilvy

Robert wrote in message ...
My original query was not clear - I want to delete all part rows in
columns A:N where the cell in column A is blank without selecting each
part row individually. The following will delete complete rows;
Range("A3:N1000").Select
Selection.SpecialCells(xlCellTypeBlanks).EntireRow .Delete
but I don't know how to restrict the deletions to columns A:N.

Robert

In message , Tom Ogilvy
writes
Range("A12:G12").Delete Shift:=xlShiftup


--
Regards,
Tom Ogilvy


Robert wrote in message

...
I have a workbook with data in columns A:N and I need to be able to
delete any blank part rows in columns A:G without disturbing the data

in
columns H:N.
How do I delete ranges, eg A12:G12 where A12 is blank, without deleting
the remaining part of the row - H12 onwards?
I know how to delete individual blank cells or entire rows where a cell
is blank but not part rows.
Grateful for any suggestions.
--
Robert


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
Deleting part of X-axis range tcek Charts and Charting in Excel 1 June 19th 09 12:56 AM
Deleting or changing a range name Dan Excel Discussion (Misc queries) 3 April 21st 06 10:53 PM
deleting worksheets from names in a range Jenn Excel Discussion (Misc queries) 2 August 23rd 05 12:00 AM
Deleting Range name's listed in the range address box. Satnam Patel Excel Discussion (Misc queries) 4 May 5th 05 01:42 PM
Deleting/Replacing Values in a Range Dan Gesshel Excel Programming 2 August 18th 03 08:54 AM


All times are GMT +1. The time now is 12:41 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"