Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
deleting rows in excel
I have an excel sheet that looks like this: jan 45.300 feb 56.987 mar 65.743 jan 43.256 feb 41.678 jan 78.934 feb 67.214 mar 56.983 etc... So it's usuallly a set of data then an empty row and then again a se of data. Problem is that I sometimes have 2 empty rows. How can delete this "extra" row ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
deleting rows in excel
try this where 20 is the last row
Sub deleteextrarow() With Columns(1) For r = 20 To 2 Step -1 With .Cells(r, 1) If .Offset(0) = "" And .Offset(1) = "" _ Then .EntireRow.Delete End With Next End With End Sub -- Don Guillett SalesAid Software "nick80" wrote in message ... I have an excel sheet that looks like this: jan 45.300 feb 56.987 mar 65.743 jan 43.256 feb 41.678 jan 78.934 feb 67.214 mar 56.983 etc... So it's usuallly a set of data then an empty row and then again a set of data. Problem is that I sometimes have 2 empty rows. How can I delete this "extra" row? ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
deleting rows in excel
Use an empty column to the right of your data, say, column
C Assuming your data starts in row 1 column a, in the first cell type: =IF(AND(A1="","A2"=""),"Delete Me","") copy this formula in each cell down to the end of the data. Next apply the AutoFilter (Data/Filter/AutoFilter) and filter column C to show "Delete Me" items. Right click on the first row header of the filtered list and then press Shift + End + down arrow to select the entire list. Right click/delete row -----Original Message----- I have an excel sheet that looks like this: jan 45.300 feb 56.987 mar 65.743 jan 43.256 feb 41.678 jan 78.934 feb 67.214 mar 56.983 etc... So it's usuallly a set of data then an empty row and then again a set of data. Problem is that I sometimes have 2 empty rows. How can I delete this "extra" row? ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inserting and Deleting Rows in Excel | Excel Worksheet Functions | |||
Deleting filtered rows in Excel | Excel Discussion (Misc queries) | |||
Deleting filtered rows in Excel | Excel Discussion (Misc queries) | |||
Deleting Rows in MS Excel | Excel Discussion (Misc queries) | |||
Deleting rows in a macro in Excel | Excel Discussion (Misc queries) |