Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Function for an array

I'm trying to figure out how to write a function (Let me explain it in an
example).

Lets say Column A is numbered from 1 - 20. In Column B there is a word that
could be one of four things (Apple, Bird, Cat, Dog). I am looking for a
function that will search for all Dogs and in another cell, write down the
number in Column A that corresponds with it.

Column A Column B
1 Cat
2 Dog
3 Apple
4 Dog
5 Bird

So in a Cell that i choose, it will list {2, 4}. Is this even possible to
do with a function?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Function for an array

There's no *practical* way to do it the way you want with the built-in
functions.

You could do it with the built-in functions if you return the results to
individual cells. There is a free add-in available that will do it the way
you want it with the limitation that the resulting string can't be more that
255 characters.

--
Biff
Microsoft Excel MVP


"KatiJ" wrote in message
...
I'm trying to figure out how to write a function (Let me explain it in an
example).

Lets say Column A is numbered from 1 - 20. In Column B there is a word
that
could be one of four things (Apple, Bird, Cat, Dog). I am looking for a
function that will search for all Dogs and in another cell, write down the
number in Column A that corresponds with it.

Column A Column B
1 Cat
2 Dog
3 Apple
4 Dog
5 Bird

So in a Cell that i choose, it will list {2, 4}. Is this even possible to
do with a function?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Function for an array

What add on is that?

"T. Valko" wrote:

There's no *practical* way to do it the way you want with the built-in
functions.

You could do it with the built-in functions if you return the results to
individual cells. There is a free add-in available that will do it the way
you want it with the limitation that the resulting string can't be more that
255 characters.

--
Biff
Microsoft Excel MVP


"KatiJ" wrote in message
...
I'm trying to figure out how to write a function (Let me explain it in an
example).

Lets say Column A is numbered from 1 - 20. In Column B there is a word
that
could be one of four things (Apple, Bird, Cat, Dog). I am looking for a
function that will search for all Dogs and in another cell, write down the
number in Column A that corresponds with it.

Column A Column B
1 Cat
2 Dog
3 Apple
4 Dog
5 Bird

So in a Cell that i choose, it will list {2, 4}. Is this even possible to
do with a function?




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Function for an array

See this:

http://xcell05.free.fr/morefunc/english/index.htm

The function you need is called MCONCAT.

You would use it in an array formula** like this:

=SUBSTITUTE(TRIM(MCONCAT(IF(B1:B20="dog",A1:A20,"" )&" "))," ",",")

The result would be: 2,4

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"KatiJ" wrote in message
...
What add on is that?

"T. Valko" wrote:

There's no *practical* way to do it the way you want with the built-in
functions.

You could do it with the built-in functions if you return the results to
individual cells. There is a free add-in available that will do it the
way
you want it with the limitation that the resulting string can't be more
that
255 characters.

--
Biff
Microsoft Excel MVP


"KatiJ" wrote in message
...
I'm trying to figure out how to write a function (Let me explain it in
an
example).

Lets say Column A is numbered from 1 - 20. In Column B there is a word
that
could be one of four things (Apple, Bird, Cat, Dog). I am looking for
a
function that will search for all Dogs and in another cell, write down
the
number in Column A that corresponds with it.

Column A Column B
1 Cat
2 Dog
3 Apple
4 Dog
5 Bird

So in a Cell that i choose, it will list {2, 4}. Is this even possible
to
do with a function?






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Array function nc Excel Discussion (Misc queries) 4 April 23rd 08 03:41 PM
OR function in array-entered IF function veggies27 Excel Worksheet Functions 8 March 11th 08 06:32 PM
AND in an array function? Vince Excel Worksheet Functions 2 April 17th 06 05:46 PM
Is there an array function or something like it? nyys Excel Worksheet Functions 0 January 12th 06 07:47 PM
#DIV/0! in the array function Sergun Excel Worksheet Functions 1 November 25th 05 01:14 PM


All times are GMT +1. The time now is 10:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"