Hello,
I have created the below macro code to delete all the rows containing "account" in column B.
Can you please help me using the below VBA codes, using IF...THEN condition.
![]()
Please Login or Register to view this content.
Hello,
I have created the below macro code to delete all the rows containing "account" in column B.
Can you please help me using the below VBA codes, using IF...THEN condition.
![]()
Please Login or Register to view this content.
Last edited by mohan_rajun; 10-25-2010 at 06:44 AM.
This is how I would write that:
![]()
Please Login or Register to view this content.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
Try this
![]()
Please Login or Register to view this content.
![]()
Because you are shifting deleted rows up it might be better to count backwards instead of forwards. Change the For line to:
![]()
Please Login or Register to view this content.
I would advise you read through: http://www.xtremevbtalk.com/showpost...70&postcount=4
ie if you intend to use AutoFilter then utilise SpecialCells etc...
edit: full tutorial link: http://www.xtremevbtalk.com/showthread.php?t=300757
Last edited by DonkeyOte; 10-25-2010 at 03:06 AM.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
I think the Jerry's code will work quicker but may have a problem if there are blank rows.
Excel people always assume users put data in well defined tables or lists.
Thanks for the link. I study now.
Hi JBeaucaire,
Thanks for the help... It worked out....
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks