Thread
:
VBA-writing a macro
View Single Post
#
1
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
VBA-writing a macro
As usual, you should copy paste your coding efforts for comments.
--
Don Guillett
SalesAid Software
"benb" wrote in message
...
I am trying to right a macro that will find what new trades that have been
added to an existing table, and then plug the ID for any new trades into a
separate table.
To do this I have four tables to work with. The first contains all of the
trade ID's as of today. The second is the same table as of yesterday.
The
third contains more information related to each trade (e.g. counterparty
and
portfolio). Finally, the fourth table is where I want to plug in the new
trade ID's belonging to a certain counterparty and portfolio.
In Excel to do this manually I use a series of Vlookups. I've tried to
accomplish the same thing with If/Then statements and Do Until Loops, but
for
some reason it isn't working. I've spent two days already trying
different
variations on the theme with no success. Can anybody suggest some script
to
help?
To try and rephrase: I need to look up a value in one table. If I find it
then I move on to the next value. If I don't find then I need to lookup
in
another table the corresponding counterparty and portfolio. If it's from
one
portfolio, I need to plug the ID into one table. If it's from another
portfolio, I need to plug it into a different one. If it's from neither
then
i just need to move on to the next value.
Thanks.
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]