d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Microsoft Excel Function Help
Add Reply New Topic New Poll
Senior Moderator
Posts: 36,529
Joined: Jul 12 2008
Gold: 15,150.00
Trader: Trusted
Jun 3 2014 06:26pm
Hi!

I'm trying to create my own personal investment plan/calculator.
I need to create a function that will grab the value from the cell above it.

In programming, I'm trying to do this:

(not correct syntax, just showing for example).

Array problem [0][50] = new double array [] [];
problem[0][0] = 100.00 ;
for ( i=1; i < problem[0].length(); i++){
problem[0][i] = problem[0][i-1] + 50;
}


If that makes any sense.

In full english terminology:
I'm trying to take a previous months value and add to it. I want it as a function so I can just drag the cell properties down a list of 50 cells and have it apply correctly (adding a monthly value to each previously calculated month).

If anyone has any advice/answers - I'd greatly appreciate it :)

Thanks again,
Austin

General help topic: http://forums.d2jsp.org/topic.php?t=70880224&f=34
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Jun 3 2014 06:36pm
if you're in cell B1, just type in

Code
=A1+50


you can drag down and each cell below will have 50 more than the above

no idea why your example is a 2D array instead of 1D, but whatever.

This post was edited by carteblanche on Jun 3 2014 06:38pm
Senior Moderator
Posts: 36,529
Joined: Jul 12 2008
Gold: 15,150.00
Trader: Trusted
Jun 3 2014 06:55pm
Quote (carteblanche @ Jun 3 2014 08:36pm)
if you're in cell B1, just type in

Code
=A1+50


you can drag down and each cell below will have 50 more than the above

no idea why your example is a 2D array instead of 1D, but whatever.


I have multiple years so in reality its [x amount of years][12]
i just did stupid shit as an example, its been a long day.


My problem is, my second amount (50 in the example, is a reference to another cell's value [D5])
However, when I drag down to each cell, it changes to D6..D7.. etc. I want D5 to be constant :(



edit:

excuse any stupidity in my posts please :\ pm me if you need clearing up with anything



I'm trying to add a variable amount (from a cell), not just plain 50.
So:

I5 + D5
I6 + D5
I7 + D5
etc etc

When I click and drag.. 'I" increments properly.. but it increments D as well:
I5 + D5
I6 + D6
etc etc

This post was edited by Textbook on Jun 3 2014 06:57pm
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Jun 3 2014 06:57pm
Quote (Textbook @ Jun 3 2014 08:55pm)
I have multiple years so in reality its [x amount of years][12]
i just did stupid shit as an example, its been a long day.


My problem is, my second amount (50 in the example, is a reference to another cell's value [D5])
However, when I drag down to each cell, it changes to D6..D7.. etc. I want D5 to be constant :(


should have said that to begin with.

=A1+$D$5
Senior Moderator
Posts: 36,529
Joined: Jul 12 2008
Gold: 15,150.00
Trader: Trusted
Jun 3 2014 06:57pm
Quote (carteblanche @ Jun 3 2014 08:57pm)
should have said that to begin with.

=A1+$D$5


Sorry.. it's been a really long day.
I'll try that and let you know how it works.
If it works i'll send some fg as a thank you for getting through my plague of stupidity.

/e worked - thank you :)

This post was edited by Textbook on Jun 3 2014 06:59pm
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll