Variance calculation between values from separate files

gigi87

New Member
Joined
Nov 19, 2017
Messages
1
Hi all,
I am beginner in Excel VBA, just starting to learn it and I would really need some help with the below problem. I am struggling to make it work with no success so far…
I am starting with 3 separate files (one having an amount of today, the second an amount of yesterday and the third is a condition that has to be checked) and I want to generate a new file that would show the variance as percentage between the 2 amounts, today and yesterday, based on the threshold limit from the 3rd file.
My files would look like this:
1) File as of Day-1 (around 25.000 rows)
Column A
Column B
Column C

Column N
Shareclass
Fund
Client Code
…….
Amount






<tbody>
</tbody>
2) File as of Day (around 25.000 rows)
Column A
Column B
Column C

Column N
Shareclass
Fund
Client Code
…….
Amount






<tbody>
</tbody>
3) In addition I have a third file with two worksheets:
- Worksheet (“Thresholds”)
Column A
Column B
Column C
Client Name
Client Code
Threshold




<tbody>
</tbody>
- Worksheet (“MMI”)
Column A
Column B
Fund
MMI



<tbody>
</tbody>
I would like to generate a file that shows the below results:
In the first worksheet will have the content of “file as of Day-1” except the client code “ABC”,“CDB” and except the funds “ab12345”, “fb45546” and “hj4564”.
In the second worksheet will have the content of “file as of Day” except the client code “ABC”,“CDB” and except the funds “ab12345”, “fb45546” and “hj4564”.
Third worksheet :
Column A
Column B
Column C
Column D
Column E
Column F
Column G
Shareclass
Fund
Client Code
Amount D-1
Amount D
Variance
Comments





%


<tbody>
</tbody>
The column F will show the variance between the amount as percentage (at shareclass level):
- if “amount D” if equal to zero or empty and “amount D-1”>0, the variance will be -100%
- if “amount D-1” if equal to zero or empty and “amount D”>0, the variance will be +100%
The column “comments” will have three values:
- “Above threshold” if the variance is greater than the threshold defined at client level
- “Below threshold” if the variance is lower than the threshold defined at client level
- “MMI” if the fund is classified as MMI
Many thanks for your help :)
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,214,911
Messages
6,122,194
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top