Dear All,

I have my excel project in VS 2010. I have made an Excel Add-In. Which has an UDF in dll. Its working fine. Since I am trying to fetch data from database and copying my formula in each cell, Its taking some time to populate the result in excel. I want to increase its response time so that it can give me result in a blink of an eye.

What I think is somehow if I copied the formula in just one cell and then for a given range if i just refer the same cell, then i can get rid of time consuming issue.

e.g. what i have is

DEMO 2-Apr-10 3-Apr-10 4-Apr-10
abc myFunction("p1,p2,p3") myFunction("p1,p2,p3") myFunction("p1,p2,p3")
pqr myFunction("p1,p2,p3") myFunction("p1,p2,p3") myFunction("p1,p2,p3")
xyz myFunction("p1,p2,p3") myFunction("p1,p2,p3") myFunction("p1,p2,p3")
lmn myFunction("p1,p2,p3") myFunction("p1,p2,p3") myFunction("p1,p2,p3")

after execution of each function returns appropriate value for corresponding cell. I have used absolute cell features i.e. with "$" to achieve above output.

I think this is responsible for poor performance because for each cell function is hitting my database. I have Server 2008.

This is what I want..

e.g.

myFunction("p1,p2,p3") 2-Apr-10 3-Apr-10 4-Apr-10
abc value1 value2 value3
pqr value4 value5 value6
xyz value7 value8 value9
lmn value10 value11 value12

The function written in the top most left cell should be able to populate the rest of excel.

I have tried lots of things but my excel knowledge is not enough to crack this. I have created some macros also but not succeeded.

Any help on this is highly appreciable.

Thanks..

`"p1,p2,p3"`

- Is it input argument(s) for function?Let me explain:

EXAMPLE 1: A1 = 5, B1 = 5, C1.FORMULA = $A$1+$B$1 then C1.VALUE = 10

When you fill formula for the rest of cells in range, all cells in column c are equal 10.

EXAMPLE 2: A1 = 5, B1 = 5, C1.FORMULA = $A1+$B1 then C1.VALUE = 10

When you fill formula for the rest of cells in range, all cells in column c, d, e, etc. are equal 10, but rows depend on value in col. A and B

EXAMPLE 3: A1 = 5, B1 = 5, C1.FORMULA = A$1+B$1 then C1.VALUE = 10

When you fill formula for the rest of cells in range, all cells in columns c, d, e, etc. are equal to values from row no. 1

EXAMPLE 4: A1 = 5, B1 = 5, C1.FORMULA = $A1+B$1 then C1.VALUE = 10

When you fill formula for the rest of cells in range, all cells in columns c, d, e, etc. are equal to values from column A and row no. 1

Depend on position of $, the result in filled cells is changing.