Hello everyone,
I`ve been going absolutely mad with an issue I just can't seem to get my head around.
I'll try to give an example to best detail the issue on hand: Imagine I get a penalty fee by having a too fast of a turnover of the cattle I trade, so If I re-sell the first day it's 17% fee and if I sell after 113 days it's as low as 7% fee.
(Example just given for context)
I've sorted all the transactions by date, name if it's sold or bought, price.
So all I want is the average amount of days between each transaction when the the cattle was bought, to the date the cattle was sold. Instead of calling them cattle, cattle1, and so on..I've given them personal names. (Tore Vagle, Rafal etc.) So I'm trying to get a formula to use the name as a criteria, this since the name can jump around on the list due to having sorting functions (sorting by date, name, value and so on). The only transactions I'm out after are the ones that have been bought and sold, not just bought. So how can I go about using the personal name as a criteria, taking the IN date, then the OUT date (on two seperate sheets) and calculating the number of days the cattle have been in my ownership.
The average days ownership per (all) cattle will help me calculate the fee on all the transactions in a very simple matter. It's just that the formula it self seems a bit hard to make now when my brain has completely shut down on the issue.
Hopeing for a helping hand here, at least to lead me in the right direction!
Thank you!
Per Å
I`ve been going absolutely mad with an issue I just can't seem to get my head around.
I'll try to give an example to best detail the issue on hand: Imagine I get a penalty fee by having a too fast of a turnover of the cattle I trade, so If I re-sell the first day it's 17% fee and if I sell after 113 days it's as low as 7% fee.
(Example just given for context)
I've sorted all the transactions by date, name if it's sold or bought, price.
So all I want is the average amount of days between each transaction when the the cattle was bought, to the date the cattle was sold. Instead of calling them cattle, cattle1, and so on..I've given them personal names. (Tore Vagle, Rafal etc.) So I'm trying to get a formula to use the name as a criteria, this since the name can jump around on the list due to having sorting functions (sorting by date, name, value and so on). The only transactions I'm out after are the ones that have been bought and sold, not just bought. So how can I go about using the personal name as a criteria, taking the IN date, then the OUT date (on two seperate sheets) and calculating the number of days the cattle have been in my ownership.
The average days ownership per (all) cattle will help me calculate the fee on all the transactions in a very simple matter. It's just that the formula it self seems a bit hard to make now when my brain has completely shut down on the issue.
Hopeing for a helping hand here, at least to lead me in the right direction!
Thank you!
Per Å