Hi all,
I have a project I am working on and need some guidance as to how I should approach this. What I need is a macro that will check a file that I have that contains a SYMBOL and a certain quantity for Long and Short next to it.
Example:
Symbol____________________Long____Short
<TABLE style="WIDTH: 158pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=211 border=0 x:str><COLGROUP><COL style="WIDTH: 158pt; mso-width-source: userset; mso-width-alt: 7716" width=211><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl65 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 158pt; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=211 height=17>4SPX110812C01355000__________200_______25</TD></TR></TBODY></TABLE>
I need to grab the symbol and look it up in another master file which has the data listed as follows:
Account#_________Symbol_________________Quantity______L/S
<TABLE style="WIDTH: 63pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=84 border=0 x:str><COLGROUP><COL style="WIDTH: 63pt; mso-width-source: userset; mso-width-alt: 3072" width=84><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 63pt; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=84 height=17>033184359__________4SPX110812C01355000_________200___________L</TD></TR></TBODY></TABLE>
033184359__________4SPX110812C01355000_________25____________S
What I need is to take the Symbol from the original file and look it up in the master file and take the total of all the Long positions and Short positions for that symbol in the master file and see if it matches the original file. If it does not, I need some indication that it does not match (Red Highlighting). To add some more complexity to the situation, I need it to only add the Long & Short values for accounts that do NOT begin with "07".
I am not looking for someone to do my work for me. If you provide me with some bread crumbs that I can follow and give me some direction it would be greatly appreciated. I am new to using VBA and do not even know how I would approach this. Thank you all for your time.
-Hash
I have a project I am working on and need some guidance as to how I should approach this. What I need is a macro that will check a file that I have that contains a SYMBOL and a certain quantity for Long and Short next to it.
Example:
Symbol____________________Long____Short
<TABLE style="WIDTH: 158pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=211 border=0 x:str><COLGROUP><COL style="WIDTH: 158pt; mso-width-source: userset; mso-width-alt: 7716" width=211><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl65 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 158pt; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=211 height=17>4SPX110812C01355000__________200_______25</TD></TR></TBODY></TABLE>
I need to grab the symbol and look it up in another master file which has the data listed as follows:
Account#_________Symbol_________________Quantity______L/S
<TABLE style="WIDTH: 63pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=84 border=0 x:str><COLGROUP><COL style="WIDTH: 63pt; mso-width-source: userset; mso-width-alt: 3072" width=84><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 63pt; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=84 height=17>033184359__________4SPX110812C01355000_________200___________L</TD></TR></TBODY></TABLE>
033184359__________4SPX110812C01355000_________25____________S
What I need is to take the Symbol from the original file and look it up in the master file and take the total of all the Long positions and Short positions for that symbol in the master file and see if it matches the original file. If it does not, I need some indication that it does not match (Red Highlighting). To add some more complexity to the situation, I need it to only add the Long & Short values for accounts that do NOT begin with "07".
I am not looking for someone to do my work for me. If you provide me with some bread crumbs that I can follow and give me some direction it would be greatly appreciated. I am new to using VBA and do not even know how I would approach this. Thank you all for your time.
-Hash
Last edited: