ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Function neede which checks if a value in a cell is in a defined s (https://www.excelbanter.com/excel-worksheet-functions/188368-function-neede-checks-if-value-cell-defined-s.html)

LastPhilippe

Function neede which checks if a value in a cell is in a defined s
 
Hello,

example:
I have a row where can be the names of animals: cow, cat, dog, frog, ...
To analyse the content against some special values, eg. pets(cat, dog), I
need a function which returns true (or 1) and false (or 0):
is_in_set(b$2$;pets)
or
is_in_set(b$2$;(cat,dog))

Any idea?
--
LastPhilippe Johannes

Luke M

Function neede which checks if a value in a cell is in a defined s
 
Sounds like you could use some sort of VLOOKUP, and if it returns an error,
you would know the item was not in your list of pets.

=IF(ISERROR(VLOOKUP(B2,D1:D10,1,FALSE)),0,1)

Where D1:D10 is where your list is.
--
Best Regards,

Luke M


"LastPhilippe" wrote:

Hello,

example:
I have a row where can be the names of animals: cow, cat, dog, frog, ...
To analyse the content against some special values, eg. pets(cat, dog), I
need a function which returns true (or 1) and false (or 0):
is_in_set(b$2$;pets)
or
is_in_set(b$2$;(cat,dog))

Any idea?
--
LastPhilippe Johannes


Marcelo

Function neede which checks if a value in a cell is in a defined s
 
see if copy and paste special transpose

solve it

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"LastPhilippe" escreveu:

Hello,

example:
I have a row where can be the names of animals: cow, cat, dog, frog, ...
To analyse the content against some special values, eg. pets(cat, dog), I
need a function which returns true (or 1) and false (or 0):
is_in_set(b$2$;pets)
or
is_in_set(b$2$;(cat,dog))

Any idea?
--
LastPhilippe Johannes


Marcelo

Function neede which checks if a value in a cell is in a defin
 
sorry I have posted it wrong
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Marcelo" escreveu:

see if copy and paste special transpose

solve it

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"LastPhilippe" escreveu:

Hello,

example:
I have a row where can be the names of animals: cow, cat, dog, frog, ...
To analyse the content against some special values, eg. pets(cat, dog), I
need a function which returns true (or 1) and false (or 0):
is_in_set(b$2$;pets)
or
is_in_set(b$2$;(cat,dog))

Any idea?
--
LastPhilippe Johannes



All times are GMT +1. The time now is 03:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com