How would you make a macro that would delete the line if a field in that line say for example K1:K100 had "XX" or "XXX" in it?
How would you make a macro that would delete the line if a field in that line say for example K1:K100 had "XX" or "XXX" in it?
Do a quick search on forum for examples or see link
http://www.rondebruin.nl/delete.htm
VBA Noob
_________________________________________
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
Hi schlepers,
A quick and easy way of doing this would be to loop all the cells, check the values and then delete if need be.
This code should do the job:
I havnt had chance to check this code so look out for a glitch or a little tweak, but the basic idea is therePlease Login or Register to view this content.
thx. Let me check them out.
j--
How would you do it with:
with this if you want to fill in the Firstrow and let the code find the Lastrow in the column.
Where it automatically figures out the last line instead of the range value?Please Login or Register to view this content.
Last edited by VBA Noob; 06-12-2008 at 03:18 PM.
yea you could do that or you could write a loop to check if the active cell is the last in a list but if the list goes into its 1000's a loop could take a while
I wanted to add this into a sorting Macro. I can't seem to make it work, I'm doing it wrong?
schlepers,
Please read forum rules below. All code needs to be wrapped as I did on your first post
VBA Noob
one peice of the code that needs correcting would be the
when using Or/And in IF block you need to re compair like so:Please Login or Register to view this content.
(i have highlighted the change)
Please Login or Register to view this content.
Last edited by VBA Noob; 06-12-2008 at 04:23 PM.
I wanted to add this into a sorting Macro. I can't seem to make it work, I'm doing it wrong?
Please Login or Register to view this content.
I gete an error when I run above for some reason??
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks