View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Array formula to code

The easiest way to do this is to record a macro and "enter" the function
again. You really just need to commit the function again. End the macro
recorder and see what you have.
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"art" wrote:

Hello all:

I have the following formula to extract data from a long list. The list has
two columns, the first one with amounts, the second one with items. I use
this Array formula to give me in a list onlt the items that have an amount
next to it. I sense that this array is causing my workbook to work slow.
I am thinking now that maybe a custom funtion might work faster. Please let
me know if I am right. And if I am right, how to convert this formula to a
vba code.

=IF(ROWS(Sheet1!$1:1)<=COUNTIF(First,"0"),INDEX(F irst,SMALL(IF((ISNUMBER(First)*(First0)),ROW(Firs t)-ROW(Sheet1!A$1)+1),ROWS(Sheet1!$1:1)))&"

"&INDEX(Second,SMALL(IF((ISNUMBER(First)*(First0) ),ROW(First)-ROW(Sheet1!A$1)+1),ROWS(Sheet1!$1:1))),"")

"First" is a name range for the column with the amounts.
"Second" is the second column with the items in it.

Thanks