Hey guys,
there is something I need to do daily and it takes me about 30min so I thought maybe it's possible to automate the steps I go through.
I already created the macro that will do the first step and need help with the second step. If you look at the uploaded sheet, you can just run the first macro and it will do some sorting and stuff which I was able to do. The next step is a little bit more complicated. Once step one has been done and the columns have been shifted around and the data has been sorted I want to do this:
The first column will show you the Instrument Codes and the second column will show you the Open Positions. I want the macro to go through the instrument codes, and every time it sees the same instrument code listed multiple times, I want it to take the coresponding open positions and add them up and have the sum listed under one security code and delete the remaining. For example:
Before:
After:
That's about it. It woudl be useful to have this macro be called step2, so I can look at it in the future, in case I need to make changes.
Thank you very much.