I have an excel spreadsheet that I would like the numeric values in column H to be summed based upon if the cells in column F have the words equity or real estate investment trust. This amount would be totaled and divided by the total amount of the account. This would be the equity percentage of the account. The total amount of the account would be the sum in column H for the amount of rows that the same account number appears in column B. There would be a separate sum in column F if the cell has the words fixed income or cash and cash equivalents. There would be a sum of the values in column H if the word fixed income or cash and equivalents appeared in column F. This amount would be divided by the total amount to get the % fixed income of the total. This would be the done for each distinct account number in column B.
The output would then be on one row: account number, percent equity, and percent fixed income.
Does anyone have an idea how to run this in vba? Thanks.