I have a table that is formatted like so:
New York -> ALBANY -> Legal & Financial -> Legal -> ATTORNEYS
where -> is sub category.
i want to limit the entire table to 5 sub-directories.. thus count 5-> then remove everything after that.
ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I guess best is to do a small user defined function in VBA to look for the nth occurence of the seperator string and keeps all that is left of that; example
Use this as a rather unprotected and unsafe peace of code just to demonstrate the principles – it’s maybe not “enduser safe” in each & every way. I tested with
with formula
=cutat(A1,"->",5)(copied down 6 times) I getyou may need to add a
trimfunction here & there if you want to remove leading/trailing blanks.Hope that helps
good luck