ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   expanding numbers? (https://www.excelbanter.com/excel-programming/403153-expanding-numbers.html)

Pendal

expanding numbers?
 
I'm not sure how to title this post. But this is what i want to do.

I need to take two variable numbers say 75 and 30000.

Then I need to step out the difference over a variable amount of cells. in
this case say 20 cells.

the output should look something like this.

75
80
93
123
178
320
....
....
....
30000

is there anyway to do this without lines and lines of code?

thanks

Mike H

expanding numbers?
 
You have requests for clarification in your other post, stick to one thread

"Pendal" wrote:

I'm not sure how to title this post. But this is what i want to do.

I need to take two variable numbers say 75 and 30000.

Then I need to step out the difference over a variable amount of cells. in
this case say 20 cells.

the output should look something like this.

75
80
93
123
178
320
...
...
...
30000

is there anyway to do this without lines and lines of code?

thanks


Pendal

expanding numbers?
 
I don't want to get off topic here, but I didn't post it twice .. i used the
Cross-Post property at the bottom of the input screen.

Gary''s Student

expanding numbers?
 
Re-check your math. In A1 put:
75
In A20 put:
3000
In A2 put:
=(A$20-A$1)/19+A1 and copy down thru A19. We see:

75
228.9473684
382.8947368
536.8421053
690.7894737
844.7368421
998.6842105
1152.631579
1306.578947
1460.526316
1614.473684
1768.421053
1922.368421
2076.315789
2230.263158
2384.210526
2538.157895
2692.105263
2846.052632
3000

--
Gary''s Student - gsnu200761


"Pendal" wrote:

I'm not sure how to title this post. But this is what i want to do.

I need to take two variable numbers say 75 and 30000.

Then I need to step out the difference over a variable amount of cells. in
this case say 20 cells.

the output should look something like this.

75
80
93
123
178
320
...
...
...
30000

is there anyway to do this without lines and lines of code?

thanks


Pendal

expanding numbers?
 
I just put numbers there to explain what I was expecting the output to look
like. I didn't expect them to be correct :)

That worked perfectly .. can you explain the equation a little more in
detail? I would like to understand exactly what is happening.

Thanks,
Chris

Gary''s Student

expanding numbers?
 
Sure. We have a starting point and an ending point. We subtract the
starting point from the ending point. We then divide this the number of
steps minus one

Why minus one??

If we only had three points: start, middle, and end, we would divide the
difference by two. Appply the first half to get to the middle and the second
half to get from the middle to the end
--
Gary''s Student - gsnu200762


"Pendal" wrote:

I just put numbers there to explain what I was expecting the output to look
like. I didn't expect them to be correct :)

That worked perfectly .. can you explain the equation a little more in
detail? I would like to understand exactly what is happening.

Thanks,
Chris


Dave D-C[_3_]

expanding numbers?
 
On big expressions, it help me to show the individual
terms to see what's going on:
B2 is =(A$20-A$1)/19+A1
in B2 put =A$20
in C2 put =A$1
in D2 put =A1
and copy down.
Then see if Excel is doing its math correctly.

Gary''s Student wrote:
Sure. We have a starting point and an ending point. We subtract the
starting point from the ending point. We then divide this the number of
steps minus one

Why minus one??

If we only had three points: start, middle, and end, we would divide the
difference by two. Appply the first half to get to the middle and the second
half to get from the middle to the end
--
Gary''s Student - gsnu200762


Pendal wrote:
"Pendal" wrote:
That worked perfectly .. can you explain the equation a little more in
detail? I would like to understand exactly what is happening.


Gary''s Student wrote:
In A1 put:
75
In A20 put:
3000
In A2 put:
=(A$20-A$1)/19+A1 and copy down thru A19.

"Pendal" wrote:
I'm not sure how to title this post. But this is what i want to do.
I need to take two variable numbers say 75 and 30000.
Then I need to step out the difference over a variable amount of cells. in
this case say 20 cells.
the output should look something like this.
75
80
93
123
178
320
...
...
...
30000
is there anyway to do this without lines and lines of code?


Rick Rothstein \(MVP - VB\)

expanding numbers?
 
I'm not sure what "input screen" you are referring to, but your message did
not "cross-post", it was "multi-posted" instead. If it had been
cross-posted, both newsgroup addresses would be shown in the "To" field of
your message... I only see one newsgroup address per posting. Just out of
curiosity, did you go back to the other newsgroup to see the answers you
received there?

Rick


"Pendal" wrote in message
...
I don't want to get off topic here, but I didn't post it twice .. i used
the
Cross-Post property at the bottom of the input screen.




All times are GMT +1. The time now is 06:05 PM.

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