View Single Post
  #16   Report Post  
Posted to microsoft.public.excel.misc
Bernie Bernie is offline
external usenet poster
 
Posts: 47
Default How to call a worksheet (as a function)

Hi Dave - let me start over - I have a 30 page worksheet that takes 2 inputs
and creates one result.

On another page of same workbook, I want to "call" this worksheet 100 times
with different input parameters and get the 100 results. This could be a
table for example. How do I call a worksheet or calculation (very
complicated calculation that cannot be put in VB as its like 2000 lines of
code)?

The calculation done to the 2 input parameters is huge. Thousands
of NPV() and PPMT() and functions and conditional statements - you name it,
including trigonometrics etc. are used in these 30 pages of financial
calculations.

So I need to "call" this 100 times with 100 different input parameters.
Obviously I cant write a 300,000 cell, 2000 line, 30 page VBA. I just simply
want to use my 30 page worksheet, which has been painfully debugged, over and
over again.

So imagine a table 100 rows and 3 columns. The first two parameters are in
the first 2 columns and the result goes into the 3rd column on the same row.
How do I fill this table (dont want to use macros or VBA)?

"Dave" wrote:

Hi Bernie,
When you say:

"In another worksheet I have a table with 10 rows and 4 columns. Column A
has values 1 thru 10, column B values 11 thru 20. column C is the result of
"calling" WS with the values A and B of the same row, and should receive the
B1 value of WS. column D again calls WS, but displays the B2 value."

I'm not sure what you mean. Could you give an example of the formulas you
are currently using in Column C?

Regards - Dave.