Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Custom Array Functions
Did you use ctrl+shift+enter ?
http://www.cpearson.com/excel/array.htm Tim "Syed Zeeshan Haider" wrote in message ... Hello Everybody, I have Excel 2003 Pro on WinXP Pro. I have been searching on internet but could not find any useful information about creating custom array functions. Can somebody tell me any links to the reference about creating custom array functions? Well, actually I saw a rather complex code on a site. This code returned array but I couldn't spend next 2 to 3 hours in understanding what was it supposed to calculate. No description was provided. I tried to experiment with my own following code: Public Function DispArray(a_number As Integer) As Variant ' yes, varaibles are not logical Dim aAd(1 To 12) As Integer Dim n As Integer For n = 1 To 12 Step 1 aAd(n) = n * a_number Next n DispArray = aAd End Function It is supposed to display multiplication table's result of a given integer (a_number). But it returns same result in all select cells. Thank you, -- Syed Zeeshan Haider ----------------------------------------------------------------------------------------------------------------------------- Download a free game to play with Internet Explorer from http://szh.20m.com/entertainment/olwg.html |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Custom Array Functions
Yes, I used ctrl+shift+enter and visited said site.
"Tim Williams" <saxifrax@pacbell*dot*net wrote in message ... Did you use ctrl+shift+enter ? http://www.cpearson.com/excel/array.htm Tim "Syed Zeeshan Haider" wrote in message ... Hello Everybody, I have Excel 2003 Pro on WinXP Pro. I have been searching on internet but could not find any useful information about creating custom array functions. Can somebody tell me any links to the reference about creating custom array functions? Well, actually I saw a rather complex code on a site. This code returned array but I couldn't spend next 2 to 3 hours in understanding what was it supposed to calculate. No description was provided. I tried to experiment with my own following code: Public Function DispArray(a_number As Integer) As Variant ' yes, varaibles are not logical Dim aAd(1 To 12) As Integer Dim n As Integer For n = 1 To 12 Step 1 aAd(n) = n * a_number Next n DispArray = aAd End Function It is supposed to display multiplication table's result of a given integer (a_number). But it returns same result in all select cells. Thank you, -- Syed Zeeshan Haider ----------------------------------------------------------------------------------------------------------------------------- Download a free game to play with Internet Explorer from http://szh.20m.com/entertainment/olwg.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Custom functions | Excel Worksheet Functions | |||
Custom functions | Excel Discussion (Misc queries) | |||
Custom Functions | Excel Worksheet Functions | |||
efficiency: database functions vs. math functions vs. array formula | Excel Discussion (Misc queries) | |||
Using custom functions within custom validation | Excel Discussion (Misc queries) |