SeaTiger
New Member
- Joined
- Jan 14, 2010
- Messages
- 10
Hello friends,
I have a worksheet that has my stock transactions. In column D, I have the # of shares bought with the cells formatted as a Number, and, in column F with the cells formatted as Accounting, where I have the total purchase cost for the date of the purchase for those shares.
I want to divide the total purchase cost for, let's say stock A, by the total # of shares bought so I can determine the net cost of each share. For this particular Stock A, I made 2 purchases on separate dates so I created the following formula to determine the net cost of each share by dividing the sum of the total purchase $ by the sun of the total # of shares bought.
=SUMPRODUCT(SUM(F11:F12))/(SUM(D11:D12))*-1 This worked & produced a net cost of $94.23.
Then, I wanted to add the following text to the beginning of the formula, "Net Cost $," so I created this formula:
="Net Cost "&SUMPRODUCT(SUM(F11:F12))/(SUM(D11:D12))*-1 However, this produced, Net Cost $94.225
I formatted the cell to 2 decimals, so I can't figured out how to get it to round up to a whole #, $94.23. What can I do?
Also, is there any other formula suggestions beside SUMPRODUCT? Thank you for help!
I have a worksheet that has my stock transactions. In column D, I have the # of shares bought with the cells formatted as a Number, and, in column F with the cells formatted as Accounting, where I have the total purchase cost for the date of the purchase for those shares.
I want to divide the total purchase cost for, let's say stock A, by the total # of shares bought so I can determine the net cost of each share. For this particular Stock A, I made 2 purchases on separate dates so I created the following formula to determine the net cost of each share by dividing the sum of the total purchase $ by the sun of the total # of shares bought.
=SUMPRODUCT(SUM(F11:F12))/(SUM(D11:D12))*-1 This worked & produced a net cost of $94.23.
Then, I wanted to add the following text to the beginning of the formula, "Net Cost $," so I created this formula:
="Net Cost "&SUMPRODUCT(SUM(F11:F12))/(SUM(D11:D12))*-1 However, this produced, Net Cost $94.225
I formatted the cell to 2 decimals, so I can't figured out how to get it to round up to a whole #, $94.23. What can I do?
Also, is there any other formula suggestions beside SUMPRODUCT? Thank you for help!