• Privacywetgeving
    Het is bij Helpmij.nl niet toegestaan om persoonsgegevens in een voorbeeld te plaatsen. Alle voorbeelden die persoonsgegevens bevatten zullen zonder opgaaf van reden verwijderd worden. In de vraag zal specifiek vermeld moeten worden dat het om fictieve namen gaat.

Excel macro question

Status
Niet open voor verdere reacties.

jaydoubleu

Nieuwe gebruiker
Lid geworden
12 mrt 2009
Berichten
2
Hi i have a question regarding excel
Below is my worksheet regarding trades:

Name Amount Type Trade Price Position Capital
0
ABI 1000 Sell -1000 19,89 -1000 19890
ABI 1000 Sell -1000 20,18 -2000 20180
ABI 1000 Buy 1000 20,05 -1000 -20045
ABI 500 Buy 500 19,64 -500 -9820
ABI 500 Buy 500 19,73 0 -9862,5
ABI 1500 Sell -1500 19,65 -1500 29475
ABI 500 Buy 500 19,55 -1000 -9772,5
ABI 1000 Buy 1000 19,55 0 -19550
MT 1500 Sell -1500 19,40 -1500 29103,75
MT 1571 Sell -1571 19,41 -3071 30490,49167
MT 1000 Sell -1000 19,36 -4071 19357,5
MT 1000 Buy 1000 19,35 -3071 -19350
MT 1000 Buy 1000 19,36 -2071 -19362
MT 2071 Buy 2071 19,40 0 -40167,045

These are stocktrades, but i would like to calculate the result of my trades. This i want to do by adding up all "capital" fields for every trade which brings my postition back to 0 (Position field). So in this case the first 5 rows are 1 trade, the next 3 and the next 6. I need a macro which looks at the Cum field and if its zero it adds-up all capital fields belonging to that trade, so all capital field starting at that 0 and upwards until the next Position = 0 is reached (excluding that one ofcourse).

Could anyone help me with such a macro? Unfortunatly im not that gifted that i can do this myself.

Regards,
Jay
 
Kun je de vraag herlezen en nagaan of je toelichtende tekst overeenkomt met de gepresenteerde gegevens ?
 
Helaas, dit is een Nederlands forum, dus graag ook in het Nederlands je vraag stellen. Sorry but this forum is Dutch.
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan