View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Deleting Rows on the basis of cell comment

A formula cannot delete rows..If you are looking for a macro try the below

Sub DeleteRows()
Dim lngRow As Long
For lngRow = Cells(Rows.Count, 1).End(xlUp).Row To 1 Step -1
Select Case UCase(Range("A" & lngRow))
Case "BE", "IE", "AT"
Rows(lngRow).Delete
End Select
Next
End Sub

--
Jacob (MVP - Excel)


"Radhakant Panigrahi" wrote:

Hi,

i need to delete the rows where the comment in the column A contains some
charaters...for example below are the comment in column A...and i need to
delete the rows where the comment in column A is BE, IE and AT. Is there any
formula by which the rows with BE, IE and AT in column A can be deleted...

DE
DE
IT
IT
PT
PT
IE
BE
IT
BE
AT

rgds
radha