Saturday, October 08, 2005

Excel User Defined Functions cannot change other cells

You'd think this issue would be well documented.

I've been struggling for some time to get a user defined function written in Visual Basic for Applications to return an array of values to a range in my spreadsheet from which it was called. Turns out this is not possible.

It doesn't show any errors. If you trap an error using an "On Error" routine, it gives you a 1004 error "Application or object defined."

I only discovered by accident that UDFs can only return a value to the cell that called them.

Friggin hell. I have a lot of working around to do.

1 Comments:

Blogger tripeak said...

mkay - i know this is completely off topic... and you can kick me for it later, but i just found out that i can play DOOM on my nano if I install linix4ipod... how crazy is that!

3:44 PM  

Post a Comment

<< Home

I shmaak SA Blogs, sorted with Amatomu.com