LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Modify to delete row

Hi Pat,

LastRow = Cells(Rows.Count, "AJ").End(xlUp).Row
For i = LastRow To 1 Step -1
If Cells(i, "AJ").Value = "1" Then
Cells(i, 1).Range("B1").Entirerow.Delete
End If
Next


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Pat" wrote in message
...
LastRow = Cells(Rows.Count, "AJ").End(xlUp).Row
For i = LastRow To 1 Step -1
If Cells(i, "AJ").Value = "1" Then

Cells(i, 1).Range("B1").ClearContents

End If
Next


The above will clear content only, what change is needed to delete the
entire row.

Pat




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I delete or modify an existing drop down list? Jim Bradley Excel Discussion (Misc queries) 2 November 4th 08 05:40 PM
Modify a UDF please? Excel Helps Excel Worksheet Functions 0 January 23rd 08 12:10 AM
i am unable to add, delete or modify in excel or word. Vinay Naidu Setting up and Configuration of Excel 1 April 20th 06 05:36 PM
Delete every 3rd row, then delete rows 2-7, move info f/every 2nd row up one to the end and delete the row below Annette[_4_] Excel Programming 2 September 21st 04 02:40 PM
How would I modify the following? BruceJ[_2_] Excel Programming 3 October 29th 03 09:31 PM


All times are GMT +1. The time now is 02:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"