View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
StumpedAgain StumpedAgain is offline
external usenet poster
 
Posts: 192
Default Deleting/Sorting

Try something like the following:

Sub ForKaren()

Dim curselection As Range

Set curselection = Range("E2") 'or wherever your values start

Do Until curselection = ""

If IsNumeric(curselection) Then
Set curselection = curselection.Offset(1, 0)
Else:
Set curselection = curselection.Offset(1, 0)
curselection.Offset(-1, 0).EntireRow.Delete
End If

Loop

End Sub

This looks in Column E to determine if the value is numeric. If it is, it
moves on. If it isn't, it will delete that row and then look at the next. I
hope this helps!!

--
-SA


"Karen" wrote:

Using Excel 2003

I have an Excel report that has over 2,000 rows. I want to delete the rows
where the text/numbers are NOT bold and keep the ones that ARE bold. Im not
sure if this is possible. If this cannot be done based on that criterion, the
rows I want to keep all have a number value in column E. Maybe it's possible
to isolate only the rows that have a value in column E. Im not sure how to
do this.

I would sort the records, but some of the cells I dont want are merged. At
least all of the rows I want to keep do not have any merged cells. Is this
possible? The range of data is A2:E2169.

Any help would be greatly appreciated €“ Thanks, Karen