Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default delete blank rows & colums

i have data with balnak rows and colums. i want to delete all blank rows and
culums. i dont know how to delete empty rows and colums
  #2   Report Post  
Posted to microsoft.public.excel.misc
D. D. is offline
external usenet poster
 
Posts: 53
Default delete blank rows & colums


use a code like this to delete blanks rows

Sub DeleteBlankRows1()
'Deletes the entire row within the selection if the ENTIRE row contains

no data.


Dim i As Long


With Application
..Calculation = xlCalculationManual
..ScreenUpdating = False


For i = Selection.Rows.Count To 1 Step -1
If WorksheetFunction.CountA(Selection.Rows(i)) = 0 Then
Selection.Rows(i).EntireRow.Delete
End If
Next i

..Calculation = xlCalculationAutomatic
..ScreenUpdating = True
End With
End Sub

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default delete blank rows & colums

If you mean all the rows below and columns to the right of your data then
you cannot - Excel will just replace them.

You can hide them by selecting the rows that you want to hide and the
selecting Format Rows Hide and columns by Format Columns Hide.

If it is odd rows or columns within the data then select the row or column
and then delete it with Edit Delete.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"Qazi Ahmad" <Qazi
wrote in message
...
i have data with balnak rows and colums. i want to delete all blank rows
and
culums. i dont know how to delete empty rows and colums



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default delete blank rows & colums

If you don't want to use VBA, you could select the entire row/column
and Edit--Go To--Special--Blanks--Edit--Delete--Entire
Row/Column.

Tim

Qazi Ahmad wrote:
i have data with balnak rows and colums. i want to delete all blank rows and
culums. i dont know how to delete empty rows and colums


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
To delete rows when more than one cell is blank [email protected] Excel Worksheet Functions 4 September 27th 06 10:49 PM
Delete ANY blank rows on worksheet Anita Excel Discussion (Misc queries) 7 August 31st 06 05:41 PM
How do I find duplicate rows in a list in Excel, and not delete it Matthew in FL Excel Discussion (Misc queries) 2 June 15th 05 09:11 PM
Protect Worksheet but allow to insert or delete rows Bob L Hilliard Excel Discussion (Misc queries) 2 June 9th 05 02:08 PM
How do I delete blank rows at the bottom of a spreadsheet to get . Miklaurie Excel Discussion (Misc queries) 1 January 26th 05 02:30 PM


All times are GMT +1. The time now is 02:11 PM.

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

About Us

"It's about Microsoft Excel"