I have text in Col K
I want to clear all data in Col K where the first two characters is MJ or ZR
Please Login or Register to view this content.
It would be appreciated if someone could kindly amend my code
I have text in Col K
I want to clear all data in Col K where the first two characters is MJ or ZR
Please Login or Register to view this content.
It would be appreciated if someone could kindly amend my code
Untested but maybe,
Please Login or Register to view this content.
Happy? Click the * to the left.
Thanks for the help
When I run the macro, I get a run time error "Type mismatch" and the code below is highlighted
Please Login or Register to view this content.
Kindly amend this section
Please Login or Register to view this content.
Maybe:
Please Login or Register to view this content.
If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)
You can't do one thing. XLAdept
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin
Thanks for the help.
I want all items cleared where the first 2 characters in Col K from row 2 are not MJ or ZR
How aboutIf you want to clear col K only remove the line in blue, otherwise remove the line in redPlease Login or Register to view this content.
How about:
Oops, should have refreshedPlease Login or Register to view this content.
Please help by:
Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know
There are 10 kinds of people in this world... those who understand binary, and those who don't.
Please Login or Register to view this content.
Last edited by xladept; 05-13-2019 at 01:53 PM.
Thanks for the help Fluff
Code works perfectly
Hi Arkadi
I replaced .entirerow.delete , with clear contents, but it clears first row
You're welcome & thanks for the feedback
Thanks for the help
Your code only clears header in 1st row
I would like all code cleared in Col K from row 2 onwards, the does NOT contain MJ and ZR in the 1st two characters in Col K
My code would likely do that if column A doesn't contain data (which is your original criteria for finding the last row). If that column is empty, or CAN be empty, then change the "A" in the LR=... line to another column that does have data consistently.
Also, if just trying to clear column K and not the whole row then change:
toPlease Login or Register to view this content.
Please Login or Register to view this content.
Thanks Arcadi
I have also added the following code to set autofilter off at end of code
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks