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 :)
 

Forum statistics

Threads
1,081,984
Messages
5,362,556
Members
400,680
Latest member
Wild Child

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top