From: koolkat on
I know how to test if a field is EQUAL to something, how do I test to see if
a field contains something?
So if I have 3 tasks with Descriptions "HAT" and "TOP HAT" and "HAT GREEN"
How do make an Iif statement true by searching for anything with HAT in it?
From: Rod Gill on
Hi,

Experiment with the Instr function. This worked for me:

IIf(InStr(1,[Text2],"Hat"),Yes,No)

--

Rod Gill
Microsoft MVP for Project - http://www.project-systems.co.nz

Author of the only book on Project VBA, see: http://www.projectvbabook.com




"koolkat" <koolkat(a)discussions.microsoft.com> wrote in message
news:EF391AFE-24AC-4609-A74A-051DA41C72AB(a)microsoft.com...
> I know how to test if a field is EQUAL to something, how do I test to see
> if
> a field contains something?
> So if I have 3 tasks with Descriptions "HAT" and "TOP HAT" and "HAT GREEN"
> How do make an Iif statement true by searching for anything with HAT in
> it?
>
> __________ Information from ESET Smart Security, version of virus
> signature database 5103 (20100510) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>

__________ Information from ESET Smart Security, version of virus signature database 5103 (20100510) __________

The message was checked by ESET Smart Security.

http://www.eset.com



From: koolkat on
SWEEET!! Thanks!

"Rod Gill" wrote:

> Hi,
>
> Experiment with the Instr function. This worked for me:
>
> IIf(InStr(1,[Text2],"Hat"),Yes,No)
>
> --
>
> Rod Gill
> Microsoft MVP for Project - http://www.project-systems.co.nz
>
> Author of the only book on Project VBA, see: http://www.projectvbabook.com
>
>
>
>
> "koolkat" <koolkat(a)discussions.microsoft.com> wrote in message
> news:EF391AFE-24AC-4609-A74A-051DA41C72AB(a)microsoft.com...
> > I know how to test if a field is EQUAL to something, how do I test to see
> > if
> > a field contains something?
> > So if I have 3 tasks with Descriptions "HAT" and "TOP HAT" and "HAT GREEN"
> > How do make an Iif statement true by searching for anything with HAT in
> > it?
> >
> > __________ Information from ESET Smart Security, version of virus
> > signature database 5103 (20100510) __________
> >
> > The message was checked by ESET Smart Security.
> >
> > http://www.eset.com
> >
> >
> >
>
> __________ Information from ESET Smart Security, version of virus signature database 5103 (20100510) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>
> .
>