View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default User Defined Function

Hi
why not use a worksheet function. Try something like the following
array formula (entered with CTRL+SHIFT+ENTER):
=INDEX(B1:B1000,SMALL(IF(A1:A1000="manufacturer",R OW(A1:A1000)),number_
occurence))

--
Regards
Frank Kabel
Frankfurt, Germany

"Rutgers_Excels "
schrieb im Newsbeitrag
...
Is there anyway I can write a user defined function that will do the
following:

Column A has a list of part descriptions
Column B has a list of Manufacturers

I want to write a FUNCTION that will look in col B for a certain
manufacturer and return the part description. I was thinking about
using something like a =small() function. That is, look in col A for
the first, second, third,... time the manufacturers name appears and
return the description.

When imputing the function in my worksheet it would read something

like
this:

=Part(Range,Manufacturer's Name, number it appears)

for example:
=Part(A1:A100,"Widget Inc.",5)

would return to me the 5th part number that comes up for the "Widget
Inc." company.

I realize that I can use Macros, Pivot Tables, and Filters to get

this
same information, but it would be a lot easier to write a funtion one
time and not have to worry about updates, etc.

Thanks for any help

P.S. Because of my inexperience in this field, I'm not sure if it can
even be done.


---
Message posted from http://www.ExcelForum.com/