Variable Find

J

Joe Murphy

I have a list of error messages that include text like << "field name"
must be entered in the following format dd-mm-yyyy. >>

I want to be able to trim the messages down to the << the must be
entered in the following format dd-mm-yyyy >> portion, removing the
<<" field name" >> bit. So I'm using something like:

=(FIND("field name", E4)),E4,RIGHT(E4,LEN(E4)-12)

This checks to see if it can find 'field name' and if it can, removes
the first 12 characters. Easy.

The problem is I only want this to happen if the _first part_ of the
string is 'field name'. So I don't want <<The first character of
"field name" must not be D,F,I,Q,U or V>> to match.

Apart from solutions based on the length of these error messages, is
there anything else I could try?

Thanks,

Joe.
 
L

Luke M

Maybe something like this:
=IF(LEFT(E4,10)="field name",RIGHT(E4,LEN(E4)-11),E4)
 

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