Nicredible
New Member
- Joined
- Jun 21, 2012
- Messages
- 2
Hello Everyone,
This is my first post on Mr. Excel, so I hope I'm not doing anything incorrectly regarding this post.
So I work for a financial institution and I'm working on an asset reconciliation. The problem with this reconciliation is that we are comparing our holdings against multiple custodies, so my vlookup formulas are incredibly complicated. I have the spreadsheet working great but the only problem is that it's over 5 mb in size.
Please see the formula below, this is the reason the file is so large. I know I could solve this file size problem easily with VBA and macros, but I've been asked to complete this task using functions alone. I'm wondering if somebody here can help me simplify the logic behind this formula. Any help or suggestions would be GREATLY appreciated.
Again, this formula is huge, it tries to do a vlookup using a stock identifier, if it can't find the matching security with that identifier, it will try a different identifier (custodies and our system don't always have the same identifier), Then, if it can't find it with the alternate identifier, it will do the same check with another custody (so both possible identifiers on both custodies), Also, if it can't find a matching security using either of those methods it will consult a mapping table (for known securities that don't match), and repeat the process till a matching security is found.
Here is the formula:
=IF(ISNA(IF(ISNA(IF(ISNA(VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE)),VLOOKUP(F4,CUSTODY1!$A$2:$T$3000,10,FALSE),VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE))),IF(ISNA(VLOOKUP(G4,SCOTIACSTDY1!$D$2:$L$3000,6,FALSE)),VLOOKUP(F4,SCOTIACSTDY1!$D$2:$L$3000,6,FALSE),VLOOKUP(G4,SCOTIACSTDY1!$D$2:$L$3000,6,FALSE)),IF(ISNA(VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE)),VLOOKUP(F4,CUSTODY1!$A$2:$T$3000,10,FALSE),VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE)))),IF(ISNA(IF(ISNA(VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE)),VLOOKUP(E4,CUSTODY1!$A$2:$T$3000,10,FALSE),VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE))),IF(ISNA(VLOOKUP(G4,SCOTIACSTDY1!$D$2:$L$3000,6,FALSE)),VLOOKUP(E4,SCOTIACSTDY1!$D$2:$L$3000,6,FALSE),VLOOKUP(G4,SCOTIACSTDY1!$D$2:$L$3000,6,FALSE)),IF(ISNA(VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE)),VLOOKUP(E4,CUSTODY1!$A$2:$T$3000,10,FALSE),VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE))),IF(ISNA(IF(ISNA(VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE)),VLOOKUP(F4,CUSTODY1!$A$2:$T$3000,10,FALSE),VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE))),IF(ISNA(VLOOKUP(G4,SCOTIACSTDY1!$D$2:$L$3000,6,FALSE)),VLOOKUP(F4,SCOTIACSTDY1!$D$2:$L$3000,6,FALSE),VLOOKUP(G4,SCOTIACSTDY1!$D$2:$L$3000,6,FALSE)),IF(ISNA(VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE)),VLOOKUP(F4,CUSTODY1!$A$2:$T$3000,10,FALSE),VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE))))
I know, it's a lot to look at, but it DOES work. It's just not lean enough.
Thanks for looking, I'd appreciate ANY input!
Nick
This is my first post on Mr. Excel, so I hope I'm not doing anything incorrectly regarding this post.
So I work for a financial institution and I'm working on an asset reconciliation. The problem with this reconciliation is that we are comparing our holdings against multiple custodies, so my vlookup formulas are incredibly complicated. I have the spreadsheet working great but the only problem is that it's over 5 mb in size.
Please see the formula below, this is the reason the file is so large. I know I could solve this file size problem easily with VBA and macros, but I've been asked to complete this task using functions alone. I'm wondering if somebody here can help me simplify the logic behind this formula. Any help or suggestions would be GREATLY appreciated.
Again, this formula is huge, it tries to do a vlookup using a stock identifier, if it can't find the matching security with that identifier, it will try a different identifier (custodies and our system don't always have the same identifier), Then, if it can't find it with the alternate identifier, it will do the same check with another custody (so both possible identifiers on both custodies), Also, if it can't find a matching security using either of those methods it will consult a mapping table (for known securities that don't match), and repeat the process till a matching security is found.
Here is the formula:
=IF(ISNA(IF(ISNA(IF(ISNA(VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE)),VLOOKUP(F4,CUSTODY1!$A$2:$T$3000,10,FALSE),VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE))),IF(ISNA(VLOOKUP(G4,SCOTIACSTDY1!$D$2:$L$3000,6,FALSE)),VLOOKUP(F4,SCOTIACSTDY1!$D$2:$L$3000,6,FALSE),VLOOKUP(G4,SCOTIACSTDY1!$D$2:$L$3000,6,FALSE)),IF(ISNA(VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE)),VLOOKUP(F4,CUSTODY1!$A$2:$T$3000,10,FALSE),VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE)))),IF(ISNA(IF(ISNA(VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE)),VLOOKUP(E4,CUSTODY1!$A$2:$T$3000,10,FALSE),VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE))),IF(ISNA(VLOOKUP(G4,SCOTIACSTDY1!$D$2:$L$3000,6,FALSE)),VLOOKUP(E4,SCOTIACSTDY1!$D$2:$L$3000,6,FALSE),VLOOKUP(G4,SCOTIACSTDY1!$D$2:$L$3000,6,FALSE)),IF(ISNA(VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE)),VLOOKUP(E4,CUSTODY1!$A$2:$T$3000,10,FALSE),VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE))),IF(ISNA(IF(ISNA(VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE)),VLOOKUP(F4,CUSTODY1!$A$2:$T$3000,10,FALSE),VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE))),IF(ISNA(VLOOKUP(G4,SCOTIACSTDY1!$D$2:$L$3000,6,FALSE)),VLOOKUP(F4,SCOTIACSTDY1!$D$2:$L$3000,6,FALSE),VLOOKUP(G4,SCOTIACSTDY1!$D$2:$L$3000,6,FALSE)),IF(ISNA(VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE)),VLOOKUP(F4,CUSTODY1!$A$2:$T$3000,10,FALSE),VLOOKUP(G4,CUSTODY1!$A$2:$T$3000,10,FALSE))))
I know, it's a lot to look at, but it DOES work. It's just not lean enough.
Thanks for looking, I'd appreciate ANY input!
Nick