Sort problem for stock trades - Page 2
Amazing chart utilities from Jon Peltier
Thanks Thanks:  0
Likes Likes:  0
Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Sort problem for stock trades

  1. #11
    Board Regular
    Join Date
    Apr 2002
    Location
    Australia
    Posts
    186
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Thanks aladin but it doesnt quite work.

    The result sorts the Sells first and then the buys and then sorts the company codes but it doesnt place the multiple company code entries first followed by the single company code entries.

    Maybe I am not making myslef clear but I appreciate you efforts.

    In business terms what happens is some clients request to buy or sell at a share within a price range so the one order may be transacted in numerous batches - this is why there are ultiple entries for the one company code. Other times the order is met in one trade only. My client wants the multiple trades done first followed by the single trades.

  2. #12
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Voodoo,
    Best solution I could come up with would be to do the intitial sort by Sell/Buy and Customer nums then loop through your cells and create values in another column for a second sort operation.
    Would count multiple sells groups, single sells, multiple buys groups, single buys, and resort based upon those values.
    Tom

  3. #13
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    81,772
    Post Thanks / Like
    Mentioned
    11 Post(s)
    Tagged
    1 Thread(s)

    Default

    On 2002-04-16 01:11, voodoo wrote:
    Thanks aladin but it doesnt quite work.

    The result sorts the Sells first and then the buys and then sorts the company codes but it doesnt place the multiple company code entries first followed by the single company code entries.

    Maybe I am not making myslef clear but I appreciate you efforts.

    In business terms what happens is some clients request to buy or sell at a share within a price range so the one order may be transacted in numerous batches - this is why there are ultiple entries for the one company code. Other times the order is met in one trade only. My client wants the multiple trades done first followed by the single trades.
    This is what I get by sorting

    A --> Descending
    C --> Descending
    B --> Ascending

    No header row checked:

    {"S",1568,6;
    "S",1568,6;
    "S",1568,6;
    "S",2568,3;
    "S",2568,3;
    "S",2568,3;
    "S",1060,1;
    "S",2526,1;
    "S",3565,1;
    "S",5698,1;
    "B",1568,6;
    "B",1568,6;
    "B",1568,6;
    "B",2659,3;
    "B",2659,3;
    "B",2659,3;
    "B",1569,1;
    "B",8856,1}

  4. #14
    Board Regular
    Join Date
    Apr 2002
    Location
    Australia
    Posts
    186
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Aladin

    Maybe i did a typo because your output looks perfect - just what I wanted. I have to leave the office now but I will check it again tommorrow.

    Only things is I would not what that number in column C to remain and infact there is already data in column C so it would have to be a column like BF or something (there ae many columns. Maybe this is a problem as I gather the columns have to be aligned.

    Thanks alot - your a lifesaver

    voodoo

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com