Im_Offset
Member
Hello everyone. I found this site yesterday (how did I not know about chandoo earlier ???), and have read many blog and forum entries here, but still cannot figure out how to sort the data I have the way I need to. I have attached a spreadsheet that shows where I am stumbling.
What I'm trying to do is take data about stock market trades, and make some reports. In the spreadsheet, I have input data about 10 trades in cells D4:H13. Ultimately I want to only enter data in columns D through P, and have the spreadsheet do everything else.
So the first sort of the data I want to accomplish is in columns S through W. I want to rank order the open trades (note: all of the trades I have listed are "open" right now) by "strike" (column G). In column V I have already done this by the formula if($V7="","",vlookup($v7,$A$4:$I$18,F$1,False)). Then I want to put the corresponding information (Open Date, Contracts, Exp Date, and Trans Price) in the appropriate columns. I can't use vlookup because it can't find the appropriate row when I have strike prices that are the same. I've read about using an array formula to list multiple instances in a series, but I don't know how to make a formula that will list the data for the next smallest strike price after finding all the similar instances.
Then I want to sort the data a second way, and I have reserved columns AA to AM for this. Here I want to list all of the "closed" trades. (Again, I don't have any closed trades listed yet). Basically, what I have done is used an if statement in each cell that says if the cell in to corresponding row of column P is marked with an "X" to enter the information of that trade in the row. This will give me a table of data of all closed trades, but it will probably have some blank rows in it. I planned to eliminate the blank rows and get that data sorted by "Open Date" by using columns AQ to BC. But I don't know how to do that either.
Can anyone help me with my problem? And by all means, if there is a way to get the data sorted using fewer columns that I am currently using, please feel free to show me how to do that as well.
Thank you in advance.
Also, I will take the Excel and VBA class shortly after my upcoming vacation. I'm sure those classes will teach me what I am trying to do, but until then, I am asking for help.
What I'm trying to do is take data about stock market trades, and make some reports. In the spreadsheet, I have input data about 10 trades in cells D4:H13. Ultimately I want to only enter data in columns D through P, and have the spreadsheet do everything else.
So the first sort of the data I want to accomplish is in columns S through W. I want to rank order the open trades (note: all of the trades I have listed are "open" right now) by "strike" (column G). In column V I have already done this by the formula if($V7="","",vlookup($v7,$A$4:$I$18,F$1,False)). Then I want to put the corresponding information (Open Date, Contracts, Exp Date, and Trans Price) in the appropriate columns. I can't use vlookup because it can't find the appropriate row when I have strike prices that are the same. I've read about using an array formula to list multiple instances in a series, but I don't know how to make a formula that will list the data for the next smallest strike price after finding all the similar instances.
Then I want to sort the data a second way, and I have reserved columns AA to AM for this. Here I want to list all of the "closed" trades. (Again, I don't have any closed trades listed yet). Basically, what I have done is used an if statement in each cell that says if the cell in to corresponding row of column P is marked with an "X" to enter the information of that trade in the row. This will give me a table of data of all closed trades, but it will probably have some blank rows in it. I planned to eliminate the blank rows and get that data sorted by "Open Date" by using columns AQ to BC. But I don't know how to do that either.
Can anyone help me with my problem? And by all means, if there is a way to get the data sorted using fewer columns that I am currently using, please feel free to show me how to do that as well.
Thank you in advance.
Also, I will take the Excel and VBA class shortly after my upcoming vacation. I'm sure those classes will teach me what I am trying to do, but until then, I am asking for help.