d2jsp
Log InRegister
d2jsp Forums > d2jsp > General Help > Microsoft Excel Function
Add Reply New Topic
Senior Moderator
Posts: 36,529
Joined: Jul 12 2008
Gold: 15,150.00
Trader: Trusted
Jun 3 2014 06:23pm
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).

Thanks for your help (if this requires more specialized help, I'll try programmers sub forum as well, don't feel like you have to help/do advanced research).
I've done some moderate googling, but I'm a bit tired and may not be properly googling.
edit: I'm going to post con-currently in Programmers Haven as well per recommendation from another user.
If anyone has any advice/answers - I'd greatly appreciate it :)

Thanks again,
Austin

This post was edited by Textbook on Jun 3 2014 06:25pm
Member
Posts: 10,655
Joined: Jan 18 2007
Gold: 6,205.82
Trader: Trusted
Jun 3 2014 06:29pm
Sorry if I misunderstand here (2:30AM is my excuse :P ), is this what you're trying to accomplish?



What it does is there's an initial value of 50 in A1, the rest is the value of previous cell + 50.
If so, it's really simple, put "=A1 + 50" in A2, and you can easily drag it down, it'll change "A1 + 50" to "A2 + 50", "A3 + 50" etc. as you go down.
Senior Moderator
Posts: 36,529
Joined: Jul 12 2008
Gold: 15,150.00
Trader: Trusted
Jun 3 2014 06:56pm
Quote (Sajage @ Jun 3 2014 08:29pm)
Sorry if I misunderstand here (2:30AM is my excuse :P ), is this what you're trying to accomplish?

http://puu.sh/9e0EV/ddbb777fa7.png

What it does is there's an initial value of 50 in A1, the rest is the value of previous cell + 50.
If so, it's really simple, put "=A1 + 50" in A2, and you can easily drag it down, it'll change "A1 + 50" to "A2 + 50", "A3 + 50" etc. as you go down.


Yes, but my post was terrible (I'm tired too, but its early here (9pm) ) long day :/

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



EDIT: SOLVED.

Thanks for your help Sajage (problem solved in programmers haven) - sent some fg as a ty ;)

This post was edited by Textbook on Jun 3 2014 06:59pm
Member
Posts: 10,655
Joined: Jan 18 2007
Gold: 6,205.82
Trader: Trusted
Jun 3 2014 07:01pm
Quote (Textbook @ 4 Jun 2014 02:56)
Yes, but my post was terrible (I'm tired too, but its early here (9pm) ) long day :/

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


Oh I see, just click into D5 in the function (not the cell) and press F4, it'll make an absolute reference and change it to $D$5, that way it'll always stay D5. :)

/edit I was too late I guess, thanks for the fg! :)

This post was edited by Sajage on Jun 3 2014 07:02pm
Go Back To General Help Topic List
Add Reply New Topic