From: koolkat on 10 May 2010 18:18 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 10 May 2010 18:31 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 10 May 2010 19:36 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 > > > > . >
|
Pages: 1 Prev: Columns with Drop Down Menu Customized Next: Reinstallation of MS Project 2007 from img file |