text function Find

A

Alexandra

Hello.

Is there a text function in MS Project similar to the Find formula in Excel?

I have a sring like: company_name»department»subdepartment»subsubdepartment

and I want to extract the department out of it. In excel I'd use the find
formula to find the first '»' and then the second '»', then calculate how
many characters between the first and second '»' and then use the Mid
formula to extract the string.
The mid formula exists in Project but there's no formula like the Find, is
there? How can I do this?

Than you
 
J

John

Alexandra said:
Hello.

Is there a text function in MS Project similar to the Find formula in Excel?

I have a sring like: company_name»department»subdepartment»subsubdepartment

and I want to extract the department out of it. In excel I'd use the find
formula to find the first '»' and then the second '»', then calculate how
many characters between the first and second '»' and then use the Mid
formula to extract the string.
The mid formula exists in Project but there's no formula like the Find, is
there? How can I do this?

Than you

Alexandra,
The simple answer, yes. I use text parsing techniques quite often in the
VBA code I write. The two functions I use the most are the Instr and Mid
Functions. You can find their full syntax in the VBA object browser.

However I caution you. When parsing text strings, you are often at the
mercy of user input. Users don't always input textual information as
they are "supposed" to, and it is very easy to overlook some small
detail that will render your parsing algorithm ineffective (i.e. give
unexpected results).

John
Project MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top