ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Range analisys (https://www.excelbanter.com/excel-programming/402667-re-range-analisys.html)

Alan Beban[_2_]

Range analisys
 
ilia wrote:
An in-cell UDF (or any worksheet function for that matter) can only
modify the value of the cell from which it is called. It cannot
modify font, number format, or values of other cells.

If your analysis needs to put results in other cells, you can either
have a UDF that returns an array, or a Sub that populates cells where
you want the analysis.


Or a Sub procedure that calls the UDF that populates the cells.

Alan Beban

eggpap

Range analisys
 
Thank for your messages, in the meantime I have adopted
the change event of the worksheet. The analysis procedure
triggers when the user changes a value in one cell. If the target.value
equals a given string the procedure accomplishes the analysis.

However the procedure fails if the calculation option is set
to automatic since during the runtime the change event is triggered
by other UDF I must use.

Only if I set the calculation to manual I get the success of the
procedure. I have tried also to use the Application.Calculation statement
to set the calc. to manual at the start and to automatic at the end
of the change event, but it seems that they are ignored.

Is there a manner to accomplish the procedure successfully
without setting the calc. to manual?

I use Excel 2003.

Emiliano

"Alan Beban" ha scritto nel messaggio
...
ilia wrote:
An in-cell UDF (or any worksheet function for that matter) can only
modify the value of the cell from which it is called. It cannot
modify font, number format, or values of other cells.

If your analysis needs to put results in other cells, you can either
have a UDF that returns an array, or a Sub that populates cells where
you want the analysis.


Or a Sub procedure that calls the UDF that populates the cells.

Alan Beban





All times are GMT +1. The time now is 03:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com