ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to chart data generated in a macro in any desired sheet. Pleas (https://www.excelbanter.com/excel-programming/421681-how-chart-data-generated-macro-any-desired-sheet-pleas.html)

BEETAL

How to chart data generated in a macro in any desired sheet. Pleas
 
For Urgent attention please.

1. How do I plot data generated in a Function macro. Assume that I generated
a data range which I need to be plotted on a sheet.

I have 300 points to be plotted,say. the problem arises because I CANn't use
the following command to paste data generated while running a Function.

Cells(i + 10, j + 2).Value = spread(i, j) - does not work in a function
..works in a Sub.

Why
--
beetal

Dave Peterson

How to chart data generated in a macro in any desired sheet. Pleas
 
Functions return values to the cells that contain the formula. They can't
change the values in other cells.

Maybe you can rewrite your function so that it returns an array and you can use
a multi-cell array formula to to enter the formula.

Or maybe you could a macro that you run on demand to populate the cells.

Or maybe you could use some worksheet event that populates the cells.

BEETAL wrote:

For Urgent attention please.

1. How do I plot data generated in a Function macro. Assume that I generated
a data range which I need to be plotted on a sheet.

I have 300 points to be plotted,say. the problem arises because I CANn't use
the following command to paste data generated while running a Function.

Cells(i + 10, j + 2).Value = spread(i, j) - does not work in a function
.works in a Sub.

Why
--
beetal


--

Dave Peterson


All times are GMT +1. The time now is 09:56 PM.

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