View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
windsurferLA windsurferLA is offline
external usenet poster
 
Posts: 50
Default Custom Function to Retrieve Spread Sheet Data

Custom Function to Retrieve Spread Sheet Data

I am pretty sure that I have done the following successfully many years
ago using my Excel97, but I can’t recall how.

My workbook has two spreadsheets. The first [TaxOnSell] computes CASHOUT
from PRICE and DOWNPAYMENT.

In the second, I want to build a table showing the amount of CASHOUT as
a function of various values for PRICE and DOWNPAYMENT.

My though was to insert a custom function in the various cells of the
second spreadsheet. The custom function would be of the form:

Function CASHOUT(DOWN, PRICE)
Worksheets("TaxOnSell").Range("E6").Value = PRICE
Worksheets("TaxOnSell").Range("B43").Value = DOWN
CASHOUT = Worksheets("TaxOnSell").Range("E58").Value
End Function

The function returns “#VALUE” , an indication I’m doing something wrong.

Can I use a custom function in the above described manner, and if so,
how do I get it to enter and retrieve the data?