Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula for field containing a word

Status
Not open for further replies.

Tupence

MIS
Aug 31, 2005
16
FR
Hi All,

I am trying to find a formula for finding a six letter string within a field, in order to create a group

unfortunately the way the data is entered the six letter word could be anywhere in the field.

is there a formula function that could be used to do this?

thanks
 
If instr({YourStringField},"abc123")>0 then "String Found" else "String Not Found".

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"A fine is a tax for doing wrong. A tax is a fine for doing well.
" - unknown
 
Yes, both LIKE and IN. e.g.
Code:
{address.town} LIKE "Alice"
or
Code:
"Alice" IN {address.town}

Either command would give you "Alice Springs" and also "Alicegruf", if there was such a place. LIKE also allows fancy selections, 'wild cards'

It helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods change between versions, and higher versions have extra options.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top