Need a macro for extracting this data

nishant123

New Member
Joined
Jan 17, 2011
Messages
2
I have a set of data in note pad which gets revised every day and it keeps on updating on the regular basis as and when things are done live i will post a set of data here .Following are the three set of examples:

51065778,11,OPTSTK,SBIN ,27JAN2011, 2650.00,CE,SBIN11JAN2650CE ,1 ,RL ,1 ,PROP1,1 ,2,125 , 54.15,2,10975 ,10975 ,OPEN ,UNCOVER,10 JAN 2011 14:06:34,10 JAN 2011 14:06:34,2011011056238489,Nil ,10 JAN 2011 14:06:34


51085671,11,OPTSTK,RELIANCE ,27JAN2011, 1060.00,CE,RELIANCE11JAN1060CE ,1 ,RL ,1 ,PROP1,1 ,2,250 , 18.60,2,10975 ,10975 ,OPEN ,UNCOVER,10 JAN 2011 14:09:23,10 JAN 2011 14:09:23,2011011056338929,Nil ,10 JAN 2011 14:09:23

50288150,11,FUTSTK,SBIN ,27JAN2011, , ,SBIN11JANFUT (Script name) ,1 ,RL ,1 ,PROP1,1 ,1(here 1 means bot),125(here 125 is the number of shares) , 2648.95( here this is the rate),2,10975 ,10975 ,OPEN ,UNCOVER,10 JAN 2011 10:16:46,10 JAN 2011 10:16:46,2011011051737593,Nil ,10 JAN 2011 10:16:46



these are the 3 data from so there is a list of all such things and many more so from the above list if i want to get only SBIN11JANFUT ie the SBIN thing might change there are 255 other company names also, so the thing is 11JANFUT is common in all so as and when i do the companys trade then i want a macro that should update it saying (considering that i want the data from the 3rd sample) i would like to have No.of shares then rate then scriptname and if its buy is should go on the left side ie this is the Excel type i want it in.:


<table class="MsoTableGrid" style="border: medium none ; border-collapse: collapse;" border="1" cellpadding="0" cellspacing="0"> <tbody><tr style="height: 13.5pt;"> <td style="border: 1pt solid black; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
</td> <td style="border-style: solid solid solid none; border-color: black black black -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
</td> <td style="border-style: solid solid solid none; border-color: black black black -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
[FONT=&quot]BUY<o:p></o:p>[/FONT]
</td> <td style="border-style: solid solid solid none; border-color: black black black -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
</td> <td style="border-style: solid solid solid none; border-color: black black black -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
</td> <td style="border-style: solid solid solid none; border-color: black black black -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
</td> <td style="border-style: solid solid solid none; border-color: black black black -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
[FONT=&quot]Sell<o:p></o:p>[/FONT]
</td> <td style="border-style: solid solid solid none; border-color: black black black -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
</td> </tr> <tr style="height: 13.5pt;"> <td style="border-style: none solid solid; border-color: -moz-use-text-color black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top"> [FONT=&quot]Qty<o:p></o:p>[/FONT]
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top"> [FONT=&quot]Traded rate<o:p></o:p>[/FONT]
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
[FONT=&quot]Stock<o:p></o:p>[/FONT]​
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
[FONT=&quot]P/L<o:p></o:p>[/FONT]​
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top"> [FONT=&quot]Qty<o:p></o:p>[/FONT]
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top"> [FONT=&quot]Traded rate<o:p></o:p>[/FONT]
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
[FONT=&quot]Stock<o:p></o:p>[/FONT]​
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
[FONT=&quot]P/L<o:p></o:p>[/FONT]​
</td> </tr> <tr style="height: 13.5pt;"> <td style="border-style: none solid solid; border-color: -moz-use-text-color black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top"> [FONT=&quot] <o:p></o:p>[/FONT]
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top"> [FONT=&quot] <o:p></o:p>[/FONT]
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top"> [FONT=&quot] <o:p></o:p>[/FONT]
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top"> [FONT=&quot] <o:p></o:p>[/FONT]
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top"> [FONT=&quot] <o:p></o:p>[/FONT]
</td> </tr> <tr style="height: 13.5pt;"> <td style="border-style: none solid solid; border-color: -moz-use-text-color black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top"> [FONT=&quot] <o:p></o:p>[/FONT]
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top"> [FONT=&quot] <o:p></o:p>[/FONT]
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top"> [FONT=&quot] <o:p></o:p>[/FONT]
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top"> [FONT=&quot] <o:p></o:p>[/FONT]
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top"> [FONT=&quot] <o:p></o:p>[/FONT]
</td> </tr> <tr style="height: 13.5pt;"> <td style="border-style: none solid solid; border-color: -moz-use-text-color black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top"> [FONT=&quot] <o:p></o:p>[/FONT]
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top"> [FONT=&quot] <o:p></o:p>[/FONT]
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top"> [FONT=&quot] <o:p></o:p>[/FONT]
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top">
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top"> [FONT=&quot] <o:p></o:p>[/FONT]
</td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; height: 13.5pt;" nowrap="nowrap" valign="top"> [FONT=&quot] <o:p></o:p>[/FONT]
</td> </tr> </tbody></table> <o:p> </o:p>
So if bought then should go on the buy side and if sold should go on the sell side.so it should give the Qty ,The rate and then the name doe the Stock (Srcip ie companies name ) p/l is for my purpose that will give me my profit \loss on real time basis so my data is updating on real time basis .

So i need a macro which gets the data i want and feeds it and remember if new stock name is added then it should not over write the first one .So please help me on this one .
 
You asked for a LOT of things and you weren't really clear. Why don't you say more clearly what you want and post the code that you are already trying to do? I believe the board is for helping, not doing the work for you!
 
Upvote 0
ya i know the board is for helping ...and thats what i am asking for ....its not my work i just need help i have the data just need someone to help me write a macro so that i can get the data on to it ...i am not an IT person a lay man trying to learn excel as good as i can so i asked people here .

i have given the set of examples above from that i want to get that thing on to my excel as its a notepad format which has everyday data example 1701.txt then 1801.txt so on the file name goes so on the current day if i do any thing then i need that out put in the excel which i have pasted ...so needed help on it.

Trying to do my best and being clear.Hope that helps and i get help.Thanks
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top