Thread: Delete Row
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Delete Row

Try

Rows(Range("TheRow").Value).Delete

where TheRow is the name of the cell containing the row number to
delete.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"JohnUK" wrote in message
...
Hi,
I am looking for a way to delete a row depending on a number in
a range. For
example, if 124 was in the range, I would then want to delete
row 124.
My Poor attempt:

Sub Macro22()
Row = Range("Row").Value
Rows(" & Row & ").Select
Selection.Delete
End Sub

Any help greatly appreciated
Regards
John