View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
RobG RobG is offline
external usenet poster
 
Posts: 10
Default VBA equivalent for Excel "indirect()" function in UDF

One further question,

The Calculation speed by replacing the large Formulae to the UDF decreased
exponentially. ie a nano second to 20 seconds.

Is this a general inefficiency of UDF's or is there something i have done
wrong in the code? I am only pasting this function on a 200x24 grid!

"joel" wrote:


I think something simple like this

Function IndirectSht(Target As Range, ShtName As String)
InDirectSht = Sheets(ShtName).Range(Target.Address)
End Function


Call with
=IndirectSht(A6,"sheet2")


The function will return the data in another sheet at the same range
that is specified on the current sheet.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=157454

Microsoft Office Help

.