Hello All, this is my first time using the forum to post a question but your answers have been helping me out in the past
I am having a hard time figuring this one out and putting it all together.
I have data in column A that represents account numbers whose counts will be different every time I run the sheet. There are two other variables associated with the account numbers that I use in a calculation, such as a percentage and a return. The scope is to get an aggregate return. So I would use the simple sUMPRODUCT(H3:H7,J3:J7) for example.
So the data looks somewhat like this:
A H J
XX 2.5 75%
XX 3.7 15%
XX 4.31 10%
YYY 3.2 30%
YYY 1.2 40%
YYY 0.5 15%
YYY 3.5 15%
DD 2.2 80%
DD 1.5 20%
Column A will not be constant, that is XX isn't always going to show up first, and it will not always have only 3 rows of data.
I need a macro or formula that will sumproduct H and J for applicable account numbers. So for XX the solution would be in cell K3, for YYY in cell K6, etc.
I was thinking about inserting empty row via a macro between account numbers and loop the calculation until empty row, but I am having a hard time making it work.
Any suggestions, either macro or some sophisitacated sumproduct formula that I don't know how to write would be very helpful. Even if you point me in the right direction on what to research, I would be greatful!!
Thank you soooo much!
I am having a hard time figuring this one out and putting it all together.
I have data in column A that represents account numbers whose counts will be different every time I run the sheet. There are two other variables associated with the account numbers that I use in a calculation, such as a percentage and a return. The scope is to get an aggregate return. So I would use the simple sUMPRODUCT(H3:H7,J3:J7) for example.
So the data looks somewhat like this:
A H J
XX 2.5 75%
XX 3.7 15%
XX 4.31 10%
YYY 3.2 30%
YYY 1.2 40%
YYY 0.5 15%
YYY 3.5 15%
DD 2.2 80%
DD 1.5 20%
Column A will not be constant, that is XX isn't always going to show up first, and it will not always have only 3 rows of data.
I need a macro or formula that will sumproduct H and J for applicable account numbers. So for XX the solution would be in cell K3, for YYY in cell K6, etc.
I was thinking about inserting empty row via a macro between account numbers and loop the calculation until empty row, but I am having a hard time making it work.
Any suggestions, either macro or some sophisitacated sumproduct formula that I don't know how to write would be very helpful. Even if you point me in the right direction on what to research, I would be greatful!!
Thank you soooo much!