concavebuoyancy
New Member
- Joined
- Apr 21, 2024
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
Hi all,
I have where at the start of every month, I import data where it includes the prices of fruit people have bought then, example:
In the above data, Person 1 has bought $4 of fruit, and Person 2 $3 of fruit.
Next, I want to define which of these are 'expensive fruits', in that the price of the fruit they bought is 40% >= of the total purchase cost. In this case, only Person 1 has bought an expensive fruit (Apple), as it was 50% of their total purchase cost ($2 out of $4)
In another sheet at the end of every month, I import another set of data where it again includes the prices of fruit people have bought then, example:
This is where I am stuck - Based on these 2 sheets of data, I want to sum per person, how much they spent on fruit at the end of month, divided into expensive and non-expensive fruits.
Therefore, the results would look like:
I have where at the start of every month, I import data where it includes the prices of fruit people have bought then, example:
Buyer (Start of month) | Fruit (Start of month) | Price (Start of month) |
Person 1 | Apple | $2 |
Person 1 | Orange | $1 |
Person 1 | Pear | $1 |
Person 2 | Apple | $1 |
Person 2 | Orange | $1 |
Person 2 | Pear | $1 |
In the above data, Person 1 has bought $4 of fruit, and Person 2 $3 of fruit.
Next, I want to define which of these are 'expensive fruits', in that the price of the fruit they bought is 40% >= of the total purchase cost. In this case, only Person 1 has bought an expensive fruit (Apple), as it was 50% of their total purchase cost ($2 out of $4)
In another sheet at the end of every month, I import another set of data where it again includes the prices of fruit people have bought then, example:
Buyer (End of month) | Fruit (End of month) | Price (End of month) |
Person 1 | Apple | $3 |
Person 1 | Orange | $2 |
Person 2 | Apple | $2 |
This is where I am stuck - Based on these 2 sheets of data, I want to sum per person, how much they spent on fruit at the end of month, divided into expensive and non-expensive fruits.
Therefore, the results would look like:
Buyer | Total Cost (Non-expensive fruit) | Total Cost (Expensive fruit) |
Person 1 | $2 (The orange) | $3 (The apple, as it was >= 40% of their total purchase cost at the start of the month) |
Person 2 | $2 (The apple. This is not an expensive fruit for them, as it only cost them $1/33% of their total purchase cost at the start of the month) | 0 |