# lookup returning true or false

mike_vr
Guest
Posts: n/a

 31st Jan 2008
Hi there

Been asked by a colleague if there's a function that is in essence a search
function that returns true or false. I'm sure there is one but for the life
of me I can't think what it is!!

Basically what they're trying to do is have 6 columns of copious amounts of
data, and then a 7th column with only a few bits of data, and in column 8
they would like a true or false depending on whether the data in column 7
appears anywhere in columns 1-6.

Sounds pretty simple but I just can't think how to do it right now, help!!!

Many thanks,

Mike

Dave Peterson
Guest
Posts: n/a

 31st Jan 2008
=if(countif(a:f,g1)>0,true,false)

mike_vr wrote:
>
> Hi there
>
> Been asked by a colleague if there's a function that is in essence a search
> function that returns true or false. I'm sure there is one but for the life
> of me I can't think what it is!!
>
> Basically what they're trying to do is have 6 columns of copious amounts of
> data, and then a 7th column with only a few bits of data, and in column 8
> they would like a true or false depending on whether the data in column 7
> appears anywhere in columns 1-6.
>
> Sounds pretty simple but I just can't think how to do it right now, help!!!
>
> Many thanks,
>
> Mike

--

Dave Peterson

mike_vr
Guest
Posts: n/a

 31st Jan 2008
Hi Dave,

Thanks for that, works perfectly! Do you mind me asking how it works
perfectly though? Just confused by the >0 for the countif?

Thanks again

"Dave Peterson" wrote:

> =if(countif(a:f,g1)>0,true,false)
>
>
> mike_vr wrote:
> >
> > Hi there
> >
> > Been asked by a colleague if there's a function that is in essence a search
> > function that returns true or false. I'm sure there is one but for the life
> > of me I can't think what it is!!
> >
> > Basically what they're trying to do is have 6 columns of copious amounts of
> > data, and then a 7th column with only a few bits of data, and in column 8
> > they would like a true or false depending on whether the data in column 7
> > appears anywhere in columns 1-6.
> >
> > Sounds pretty simple but I just can't think how to do it right now, help!!!
> >
> > Many thanks,
> >
> > Mike

>
> --
>
> Dave Peterson
>

Dave Peterson
Guest
Posts: n/a

 31st Jan 2008
=countif(a:f,g1)
will return the number of cells that match G1.

So if that count is greater than 0 (1 or 2 or 999999), then put True, otherwise
put False.

Debra Dalgleish has a lot of info about counting stuff including using
=countif() here:

http://contextures.com/xlFunctions04.html#CountIf

mike_vr wrote:
>
> Hi Dave,
>
> Thanks for that, works perfectly! Do you mind me asking how it works
> perfectly though? Just confused by the >0 for the countif?
>
> Thanks again
>
> "Dave Peterson" wrote:
>
> > =if(countif(a:f,g1)>0,true,false)
> >
> >
> > mike_vr wrote:
> > >
> > > Hi there
> > >
> > > Been asked by a colleague if there's a function that is in essence a search
> > > function that returns true or false. I'm sure there is one but for the life
> > > of me I can't think what it is!!
> > >
> > > Basically what they're trying to do is have 6 columns of copious amounts of
> > > data, and then a 7th column with only a few bits of data, and in column 8
> > > they would like a true or false depending on whether the data in column 7
> > > appears anywhere in columns 1-6.
> > >
> > > Sounds pretty simple but I just can't think how to do it right now, help!!!
> > >
> > > Many thanks,
> > >
> > > Mike

> >
> > --
> >
> > Dave Peterson
> >

--

Dave Peterson

 Thread Tools Rate This Thread Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Matt Simpson Microsoft Excel Programming 0 6th Aug 2007 08:11 PM André Microsoft ASP .NET 3 28th Aug 2006 01:02 PM =?Utf-8?B?U3RldmVk?= Microsoft Excel Worksheet Functions 6 3rd Jul 2006 01:49 AM =?Utf-8?B?RW1taWU5OQ==?= Microsoft Excel Worksheet Functions 5 17th Aug 2005 04:38 PM rocky640 Microsoft Excel Programming 2 13th May 2004 04:57 PM

Features