kdigital
01-02-2009, 11:18 AM
This was introduced to me. So, I thought I would bring it to you to make sure I wasn't making it too complicated. Ok Basically data would be copy and pasted into a worksheet. The worksheet would look something like this.
Security info1 info2 price industry info3
MRKjdjdjdjdjdjd4DrugjdjdTWXdjdjdjdj10MediajdjdHNZdkdkddkdk4fooddkdkVIAkdkdd kdk4mediakdkdKFTdkdkddkdk20fooddkdkdMUdkdkddkdk40TechnologydkdkdLLYdjdjdjdj 30drugdkdkdTXNdjdjddjdjd30Technologydjdjd
So the idea is for excel to sort the column with industry in it.
Then a row is inserted between each industry and the price column for those securities are summed.
On the surface it sounds simple but then while looking at it of course it became more cumbersome.
I'm thinking if we break it down in sections first you have to identify the range as the industry column. Then sort the range.
After the Range has been sorted next you have to take a look at the column for the same industry. IF the same industry is there then you have to countdown to the bottom and insert a row.
after the row is inserted you move over to the price column and sum it.
Now how do we put that in syntax for vba code.
Security info1 info2 price industry info3
MRKjdjdjdjdjdjd4DrugjdjdTWXdjdjdjdj10MediajdjdHNZdkdkddkdk4fooddkdkVIAkdkdd kdk4mediakdkdKFTdkdkddkdk20fooddkdkdMUdkdkddkdk40TechnologydkdkdLLYdjdjdjdj 30drugdkdkdTXNdjdjddjdjd30Technologydjdjd
So the idea is for excel to sort the column with industry in it.
Then a row is inserted between each industry and the price column for those securities are summed.
On the surface it sounds simple but then while looking at it of course it became more cumbersome.
I'm thinking if we break it down in sections first you have to identify the range as the industry column. Then sort the range.
After the Range has been sorted next you have to take a look at the column for the same industry. IF the same industry is there then you have to countdown to the bottom and insert a row.
after the row is inserted you move over to the price column and sum it.
Now how do we put that in syntax for vba code.