Shaolin666
New Member
- Joined
- Apr 3, 2011
- Messages
- 3
Hello,
I wonder if someone could lend me a hand, I am trying to track some variables but having difficulty with the VBA. I have a spreadsheet to track profit margins for items i buy and sell. I will try my best to describe my problem below:
I have starting capital of £200 (Cell C18) but I buy an item for £100 (cell C3), I spend £20 (cell C9) on the item, Its new value is now £150 (Cell C13) so my profit for this item is £30 (Cell C17). These values will change for each subsequent item that follows (I have slider bars to adjust the relevant variables) I would like to keep track of the capital and cumulative profit for 10 items by presing a button after changing the variables for each item and the values for capital and cumulative profit should be copied into 2 columns of range K10:K19 and L10:L19 respectively.
Obviously if i change the variables after the first item then the values change for my previous item hence my button will be pressed at the end of each item and should copy the respective values to the first available empty cells in the ranges K10:K19 and L10:L19. Maybe the table below will describe it a little easier? Note. I am not tracking the profit, just the cumulative profit, i just displayed the profit to describe my objective a little clearer.
Capital Profit Cumulative Profit
1 £200 £30 £30
2 £230 £10 £40
3 £240 £50 £90
4 £290 £35 £125
5
6
7
8
9
10
The button needs to know whether the item is the 1st, 2nd 3rd etc and pull the correct values from the reference cells i mentioned above.
Any help at all with this would be greatly apreciated, no hurry, it is just a little pet project of mine.
Kind regards
Shaolin666
I wonder if someone could lend me a hand, I am trying to track some variables but having difficulty with the VBA. I have a spreadsheet to track profit margins for items i buy and sell. I will try my best to describe my problem below:
I have starting capital of £200 (Cell C18) but I buy an item for £100 (cell C3), I spend £20 (cell C9) on the item, Its new value is now £150 (Cell C13) so my profit for this item is £30 (Cell C17). These values will change for each subsequent item that follows (I have slider bars to adjust the relevant variables) I would like to keep track of the capital and cumulative profit for 10 items by presing a button after changing the variables for each item and the values for capital and cumulative profit should be copied into 2 columns of range K10:K19 and L10:L19 respectively.
Obviously if i change the variables after the first item then the values change for my previous item hence my button will be pressed at the end of each item and should copy the respective values to the first available empty cells in the ranges K10:K19 and L10:L19. Maybe the table below will describe it a little easier? Note. I am not tracking the profit, just the cumulative profit, i just displayed the profit to describe my objective a little clearer.
Capital Profit Cumulative Profit
1 £200 £30 £30
2 £230 £10 £40
3 £240 £50 £90
4 £290 £35 £125
5
6
7
8
9
10
The button needs to know whether the item is the 1st, 2nd 3rd etc and pull the correct values from the reference cells i mentioned above.
Any help at all with this would be greatly apreciated, no hurry, it is just a little pet project of mine.
Kind regards
Shaolin666