riiiiiichhhhhhhhh
New Member
- Joined
- Feb 23, 2022
- Messages
- 14
- Office Version
- 2016
- Platform
- Windows
Hi all,
I have been really struggling with a model that is able to calculate exchange FIFO based exchange rate differences. i could not find a way that does not make the model file to weight a ton (250MB). below is an explanation for what i am trying to acheive and at the bottom is a link to a file
FIFO
Charges are made on a daily basis and payments are made randomly in different days. Each payment made shall cover the earliest unpaid charge.
Example 1
A charge of 2 made on 01/01/2024, a charge of 2 made on 02/01/2024, and a payment of 3 made on 04/01/2024. The payment will first cover the charge of 2 made on 01/01/2024, and the remaining amount of payment of 1 will cover partially the charge of charge of 2 made on 02/01/2024.
Example 2
Example – a charge of 4 made on 01/01/2024, a charge of 2 made on 02/01/2024, a payment of 2 made on 01/01/2024, a payment of 3 made on 03/01/2024, and a payment of 1 made on 04/01/2024. The payment of 2 made on 02/01/2024 will cover 2 out of the 4 of the charge made on 01/01/2024. Out of the payment of 3 made on 03/01/2024, 2 will go to cover the remaining 2 of the charge made on 01/01/2024, and 1 of the payment of 3 made on 03/01/2024 will go to cover 1 out of the charge of 2 made on 02/01/2024. The payment of 1 made on 04/01/2024 will go to cover the remaining 1 out of the charge of 2 made on 02/01/2024.
FIFO with the addition of FX gain/loss
Each day has a rate. The rate of a payment will be the rate of the day in which the payment is made, and the rate of a charge will be the rate of the day in which the charge is made. The requirement is to calculate the exchange rate difference for each payment made against all the charges or portions of charges covered by this payment.
Steps of calculation for obtaining the result for a payment:
A charge of 2 made on 01/01/2024 with a daily rate of 4.3, a charge of 2 made on 02/01/2024 with a daily rate of 4.4, and a payment of 3 made on 04/01/2024 with a daily rate of 4.5.
Steps of calculation for obtaining the result for a payment:
in the attached file, sheet “example” can show the above examples, and sheet “master” can show a model that automatically calculates the result, but only for up to 15 charges.
link to the file:
I have been really struggling with a model that is able to calculate exchange FIFO based exchange rate differences. i could not find a way that does not make the model file to weight a ton (250MB). below is an explanation for what i am trying to acheive and at the bottom is a link to a file
FIFO
Charges are made on a daily basis and payments are made randomly in different days. Each payment made shall cover the earliest unpaid charge.
Example 1
A charge of 2 made on 01/01/2024, a charge of 2 made on 02/01/2024, and a payment of 3 made on 04/01/2024. The payment will first cover the charge of 2 made on 01/01/2024, and the remaining amount of payment of 1 will cover partially the charge of charge of 2 made on 02/01/2024.
Example 2
Example – a charge of 4 made on 01/01/2024, a charge of 2 made on 02/01/2024, a payment of 2 made on 01/01/2024, a payment of 3 made on 03/01/2024, and a payment of 1 made on 04/01/2024. The payment of 2 made on 02/01/2024 will cover 2 out of the 4 of the charge made on 01/01/2024. Out of the payment of 3 made on 03/01/2024, 2 will go to cover the remaining 2 of the charge made on 01/01/2024, and 1 of the payment of 3 made on 03/01/2024 will go to cover 1 out of the charge of 2 made on 02/01/2024. The payment of 1 made on 04/01/2024 will go to cover the remaining 1 out of the charge of 2 made on 02/01/2024.
FIFO with the addition of FX gain/loss
Each day has a rate. The rate of a payment will be the rate of the day in which the payment is made, and the rate of a charge will be the rate of the day in which the charge is made. The requirement is to calculate the exchange rate difference for each payment made against all the charges or portions of charges covered by this payment.
Steps of calculation for obtaining the result for a payment:
- Identify all charges or portion of charges covered by the payment
- Multiply each such charge or portion of such charge by its respective daily rate
- sum the results of 2
- multiply the payment by its respective daily rate
- deduct the result of 4 from the result of 3
A charge of 2 made on 01/01/2024 with a daily rate of 4.3, a charge of 2 made on 02/01/2024 with a daily rate of 4.4, and a payment of 3 made on 04/01/2024 with a daily rate of 4.5.
Steps of calculation for obtaining the result for a payment:
- Identify all charges or portion of charges covered by the payment: the payment of 3 made on 04/01/2024 covers the charge of 2 made on 01/01/2024 and a portion of 1 out of the charge of 2 made on 02/01/2024.
- Multiply each such charge or portion of such charge by its respective daily rate: charge of 2 made on 01/01/2024 covered by the payment multiplied by the respective daily rate of the charge 2*4.3=8.6. portion of 1 out of the charge of 2 made on 02/01/2024 multiplied by the respective daily rate of the charge 1*4.4=4.4
- sum the results of 2: 4.4 + 8.6 = 13
- multiply the payment by its respective daily rate: 3*4.5 = 13.5
- deduct the result of 4 from the result of 3: 13.5 – 13 = 0.5
in the attached file, sheet “example” can show the above examples, and sheet “master” can show a model that automatically calculates the result, but only for up to 15 charges.
link to the file: