Solved

Add position numbers

Posted on 2011-03-13
13
271 Views
Last Modified: 2012-05-11
Start numbering Pos#'s at 1 from top to bottom and look for rows with matching Symbol and Instruments.  If any rows exist where both Symbol and Instrument matches, then they take on the same Pos#.  Also, only one Pos# per Spread# can exist.  

It is important at this stage to re-confirm that the order has still not changed from the original.

Assistance is greatly appreciated.
TradeHist-2.3g.xlsm
0
Comment
Question by:rtod2
  • 8
  • 5
13 Comments
 
LVL 10

Expert Comment

by:Makrini
ID: 35124721
TradeHist-2.3g-1-.xlsm

Does this do that?
0
 

Author Comment

by:rtod2
ID: 35124754
I should have expanded the question to include the grouping of items within the same position.  Note that each spread# must stay together and sort in tandem.  The positions should be separated by an empty row.  I expect this to be the most difficult one to perfect but hopefully, I have done enough defining prior to this step to get is there.  It looks like we are almost home free surprisingly.  Let me know if you want me to re-ask in another thread and I will be glad to do that.  Thank you for your help.
0
 
LVL 10

Expert Comment

by:Makrini
ID: 35124761
Can I clarify?

1. Sort by Position number, then by spread number

2. Insert a blank row after every position number

?

0
 

Author Comment

by:rtod2
ID: 35124770
Yes, I think so.  I could be completely off on this but I believe so.  The following will also improve readability I think.

Change Pos# and Spread# contents to reflect the actual name of the the column Ii.e. Pos1, Pos2, Pos3, etc; and Spread1, Spread2, Spread3 respectively)
0
 

Author Comment

by:rtod2
ID: 35124796
Just noticed an issue.  It doesn't stand to reason that there would be as many Pos#'s as there are Spread#'s.  Instead there would be considerably less.
0
 
LVL 10

Accepted Solution

by:
Makrini earned 500 total points
ID: 35124820
TradeHist-2.3h.xlsm

This should be there depending on whether our "Pos" theory is correct
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 10

Expert Comment

by:Makrini
ID: 35124822
Didn't read your last comment till this.  We can have a look and find out where is wrong
0
 

Author Comment

by:rtod2
ID: 35124843
Yeah, not quite there.  Not sure where we went wrong in the logic.  It's difficult to define position.  Still looking for one that is wrong.  I think once the spreads/pairs are moved under their respective positions such that all the same position numbers appear together, it will be easier to sort out.  Not at all sure at this stage.
0
 
LVL 10

Expert Comment

by:Makrini
ID: 35124862
Try this with the sort working

 TradeHist-2.3j.xlsm
0
 

Author Comment

by:rtod2
ID: 35124891
Every leg (usually every spread), if the trade is finished, should have two spread numbers at least associated with it in order to form a position.
0
 

Author Comment

by:rtod2
ID: 35124893
That's not the right way to say it.
0
 

Author Comment

by:rtod2
ID: 35124915
Every Spread has at least an Entry side (consisting of at least 1 leg), and an Exit side (consisting of at least 1 leg).  Often, there is an adjusting spread or two in between.  Each position contains only one type of spread with only one exception.  We don't need to discuss the exception yet.
0
 

Author Closing Comment

by:rtod2
ID: 35130035
Starting over here.   Position number bad definition on my part.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now