Does anyone have any vba code which can take a list such
as this:
AAC
AAD
AAE
AAOO
AAR
AAZPB
ABC
ABP
and delete any code with more than three letters please?
Thanks in advance.
Does anyone have any vba code which can take a list such
as this:
AAC
AAD
AAE
AAOO
AAR
AAZPB
ABC
ABP
and delete any code with more than three letters please?
Thanks in advance.
Have you considered applying an Auto Filter: Text: Contains: ???? and delete results accordingly ( we assume <> ??? is not viable as you state >3 rather than <>3)
For info. re: deleting rows see Colin Legg's extensive tutorial on efficient methods.
The above would also give you the syntax nec. to put into place the above suggestion.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Thanks for that, but I don't seem to have the Text: Contains feature (using Excel 2003). Is that Excel 2007 you're using?
Hi jp001
How about creating a helping column say in B. In it put "=Len(A1)" and copy the formula down. Then sort by this column and delete all row(?) that are greater than 3.
I couldn't tell if you want to delet the entire row of strings with more than 3 letters or only the cells themselves. If you want to delete the cells, do you want to shift up/down?
One test is worth a thousand opinions.
Click the * Add Reputation below to say thanks.
Profile states 2007 - hence confusion.
Using 2003 the option remains -> Filter -> Custom -> Contains -> ????
As I said though refer to the link detailed previously for efficient methods.
(there are many ways of doing this type of thing - some are significantly more efficient than others - esp. when dealing with large volumes of data)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks