ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Worksheet Function to Create Array of Size n with values x Through (https://www.excelbanter.com/excel-discussion-misc-queries/168688-worksheet-function-create-array-size-n-values-x-through.html)

Dial222

Worksheet Function to Create Array of Size n with values x Through
 
Trying to use combination of Rept function to generate an array of like
values. I then want to use this array to plot a straight line on a chart.

Is there an easier way to do this, is it possible.

Cheers



Pete_UK

Worksheet Function to Create Array of Size n with values xThrough
 
REPT is used for text values - not much use for graphs.

You could put this formula in A1:

=ROW()

and this one in B1:

=A1*C$1 + D$1

where C1 represents the slope that you want (eg set it to 2), and D1
represents the intercept on the Y axis. Then just highlight A1:B1 and
copy down for as many points as you need. Column A then contains your
x values, and column B the y values.

Hope this helps.

Pete

On Dec 6, 9:58 am, Dial222 wrote:
Trying to use combination of Rept function to generate an array of like
values. I then want to use this array to plot a straight line on a chart.

Is there an easier way to do this, is it possible.

Cheers




All times are GMT +1. The time now is 02:15 PM.

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