i have an excel sheet say with more than 1000 rows
i want to delete some rows based on certain condition say all rows which contain "AMERICA" in second column
can i do it with a macro
Use AutoFilter to select rows containing America, select all rows, delete.
Last edited by shg; 09-27-2009 at 01:46 AM.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
not this action only , i want to include this action in another macro,
Sub dele()
Range("b2").Select
Do Until Selection.Value = ""
If Selection.Value = "xxx" Then
Selection.EntireRow.Delete
Else
Selection.Offset(1, 0).Select
End If
Loop
Range("A1").Select
End Sub
i got the macro , but how to do the below
If Selection.Value not = "xxx" Then ( i have included not here)
i want to have the syntax for the above
np1966,
Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
Please edit your prior post per the above.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks