Hi,
I have a user defined function which I'd like to return some numbers as an array. i attach Excel file as an example. The basic principle is this:
1) In VBA I create function named Test and assign to it 10 numbers. When I use watch window in VBA, I can see that all values are assigned correctly to this function.
2) In Excel file I select 10 cells, enter function name (in original function there are some parameters, but for this issue they are not needed), and then press CTRL+SHIFT+ENTER.
After these steps I should see 10 cells in Excel with correct numbers assigned to this function. However, I am able to see only the first value assigned to this function in all 10 cells. I really don't get why excel doesn't show correct values. Could anyone take a look at this and suggest what should be done differently?
Best regards,
walduxas
I have a user defined function which I'd like to return some numbers as an array. i attach Excel file as an example. The basic principle is this:
1) In VBA I create function named Test and assign to it 10 numbers. When I use watch window in VBA, I can see that all values are assigned correctly to this function.
2) In Excel file I select 10 cells, enter function name (in original function there are some parameters, but for this issue they are not needed), and then press CTRL+SHIFT+ENTER.
After these steps I should see 10 cells in Excel with correct numbers assigned to this function. However, I am able to see only the first value assigned to this function in all 10 cells. I really don't get why excel doesn't show correct values. Could anyone take a look at this and suggest what should be done differently?
Best regards,
walduxas