ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   summing values according to name in defferent column (https://www.excelbanter.com/excel-programming/272820-re-summing-values-according-name-defferent-column.html)

Don Guillett[_4_]

summing values according to name in defferent column
 
try these
=sumproduct((rngA="Name")*(rngB="A")) to count
=sumproduct((rngA="Name")*(rngB="A")*(rngC*rngD)) to sum

--
Don Guillett
SalesAid Software
Granite Shoals, TX

"Lorenzo" wrote in message
om...
Hello, I hope somebody can help.
I have a sheet ordered in the following way

client sign quantity price
name1 A 3 12
name1 D 4 57
name2 A 2 12
name2 A 4 100
name2 D 3 10

where A means the client has bought something and D means he is
selling.
I would need a macro that will give on a new sheet the output of the
total operations of the client and how many operations he has done.
Example

cilent total bought total sold n. of operations
name1 36 (i.e. 3x12) 228 2
name2 424 30 3


Unfortunately, the names change every now and then, so inserting the
name in the macro would eventually prove pointless.
I have some experience with VB, but am totally at loss with this
problem (obviously I'm not as good as I wish I were). Thank you very
much for any help you might be able to give me.
Lorenzo





All times are GMT +1. The time now is 02:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com