View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Array, multiple sheets

My contention is that VBA does not support 3D arguments in UDF's. However,
someone may have better ideas than I do.

In the past I have posted a solution that parses the argument as a string
and resolves it, so if no one comes up with something better, you can use
that approach as shown at the URL:.
http://tinyurl.com/c6oo9

--
Regards,
Tom Ogilvy


"Ronny" wrote in message
ups.com...
Thank you for your quick reply.

That's what I was afraid of. Well, there is only one cell * one cell
on each sheet, so an array would not be needed there.
But that would mean I would do =IF(Sheet1!B1=B1,Sheet1!B2*Sheet1!B3,0)+
IF(Sheet2!B1=B1,Sheet2!B2*Sheet2!B3,0)+
IF(Sheet3!B1=B1,Sheet3!B2*Sheet3!B3,0)+... etc. and I would very
quickly run out of the number of IFs I can use. And it has no
flexibility as to insert more sheets etc.

Do you know of any other way? Or is it possible to create something in
VBA? I'm not really sure how VBA deals with ranges across worksheets.

Ronny