Thread: Variable Find
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Luke M Luke M is offline
external usenet poster
 
Posts: 2,722
Default Variable Find

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

Luke M
*Remember to click "yes" if this post helped you!*


"Joe Murphy" wrote:

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.