Summing the multiplication of two columns
Hello,
I would like to know how to use a formula to multiply two columns and sum the results over multiple rows.
My columns are "salary" and "percent_work" (that is, 1.0 = full time, 0.5 = half time, etc.). My rows are the employees.
I need to multiply salary * percent_work and sum over all employees to obtain the total amount of payroll. Is there a formula for that?
Thanks
Answers
-
Hey @Ligia
The easiest way to do this is to add a helper column for the multiplication
=salary@row * [percent_work]@row
The sum, which if desired could be collected in a Sheet Summary field (found in the right hand menu on sheet) since it is a single value for the entire sheet, becomes
=SUM([helper column]:[helper column])
Be sure to change all the column references to your actual column names
Does this work for you?
Kelly
-
Hi Kelly,
Thank you for your answer. I am hoping there is a way to do this without a helper column. The reason is that I need to do this operation for about 25 columns, so that would mean adding 25 helper columns.
Is it possible to do this without a helper column?
Thanks,
Ligia
-
Maybe other community members can provide alternatives. The 25 other columns- are these separate arithmetic operations? Can some/all of the operations be combined in a single or few formula(s)?
-
The 25 columns are different projects. Each employee works on one or more projects.
Thanks for trying to help.
Ligia
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!