Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this - checks a1 to a12 deleting rows if the cell is blank.
to find the last row used in a column replace For r = 12 To 1 Step -1 with For r = Range("a65536").End(xlUp).Row To 1 Step -1 Sub DelRow() Dim r As Long For r = 12 To 1 Step -1 If Cells(r, "a") = "" Then Rows(r).Delete End If Next r End Su -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the advice, but my question wasn't clear. I have a single column with cells that either contain text or a value. I need to select those cells that contain a value and delete the rows those cells are in. I want to keep the rows that cells with text are in. Thanks again.
|
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Columns(1).SpecialCells(xlConstants,xlNumbers).Ent ireRow.Delete
-- Regards, Tom Ogilvy nathan wrote in message ... Thanks for the advice, but my question wasn't clear. I have a single column with cells that either contain text or a value. I need to select those cells that contain a value and delete the rows those cells are in. I want to keep the rows that cells with text are in. Thanks again. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
So hard and yet so easy! Thanks, it works great.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting rows in two columns with a code in visual basic | Excel Discussion (Misc queries) | |||
Data filter and deleting rows in visual basic | Excel Discussion (Misc queries) | |||
Selecting Cells With Visual Basic or Macro Code | Excel Discussion (Misc queries) | |||
Deleting pictures in Excel using visual basic | New Users to Excel | |||
visual basic macro code for deleting referenced rows | Excel Programming |