Solved: Excel: Macro to match 2 tables and compute values

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

rotvik

Thread Starter
Joined
Jan 11, 2013
Messages
30
Hi

I'm trying to make a macro that match table in sheet "Vocabulary" to the second table (columns Q,R,S,T) in sheet "Overview" and compute correct values in column U using weights from column F, sheet Vocabulary on values from a corresponding cell at column M, sheet Overview. The entries for every ISIN in the sheet Vocabulary are in no particular order and some positions from sheet Overview don't have to exist in Vocabulary at all (but I still need them to display in the table on the right to be able to make charts from summing these categories).

How should the end result look like is displayed on the last sheet.:cool:

Can anyone help?(y)


Thanks

Michael
 

Attachments

rotvik

Thread Starter
Joined
Jan 11, 2013
Messages
30
Any help would be appreciated.:)

I can do some basic macros but this is way too complicated.
 
Joined
Apr 17, 2012
Messages
455
If you don't need color, remove
fillStart.CurrentRegion.Offset(1).Interior.ColorIndex = xlNone
fillStart.Interior.Color = vbRed
 

Attachments

rotvik

Thread Starter
Joined
Jan 11, 2013
Messages
30
Thank you very much! It works like a charm and the code is so clean!

And the highlighting of missing securities is a nice feature as well.

One question: Will it work for more categories? There are up to 6 categories for every ISIN in Equity_Region, 5 categories for Bonds_Type and 4 categories for Bonds_Maturity.
 
Joined
Apr 17, 2012
Messages
455
Yes. It check for the number of rows stated in the Vocab sheet to determine how many times to loop.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top