I'm looking to load data in an excel sheet from a database. I would like to do this via a function, so that when I recalc the sheet, the data is loaded. The function is something like:
=loaddata(product, startdate as date, enddate as date) in cell A1. Data for the product between startdate and enda date to be loaded in cells A2 and following.
I do not want to call the data from an array which could directly read the return array from loaddata() as I want this function to execute only if the date changes.
I have seen this done. Bloomberg, a financial news and data provider has functions that return data to cells other than the one that calls the function.
Can you help?