Sum values in column Y if the values in column X are the same

Maikevr

New Member
Joined
Dec 20, 2018
Messages
4
I'm working on a nutritional project and I want to determine the average KiloJoule intake per week out of a large food intake survey. Therefore, I want to sum the values of K for each person entry (column A). For example, I want to sum I for rows 2:5 as these are the different ingredients that one unique person ate. I sum these values in column Q, so I can eventually calculate the average KiloJoule intake per meal. This is way to much work to do manually, how can I compute the sum of values of K separately for all unique person entries in column A?

Thanks in advance!

nl.tinypic.com
[/URL][/IMG]
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
try the =sumif(), sumifs() functions
 
Upvote 0
you shouldn't if you use Col A (id) as your criteria for the sumif()

eg, to get the answer of 1956 in Q163,

=SUMIF(A:A,A9,K:K)
 
Upvote 0
or you can tidy them up with this in Q2, and copy down

=IF(AND(A2<>A1,A2=A3),SUMIF(A:A,A2,K:K),"")
 
Upvote 0
you shouldn't if you use Col A (id) as your criteria for the sumif()

eg, to get the answer of 1956 in Q163,

=SUMIF(A:A,A9,K:K)

Thank you, I see that that works, but the point is that I want to get all of my Q values simultaneously instead of computing each one individually. I expect that column to get more than 100 entries.
 
Upvote 0
Thank you, I see that that works, but the point is that I want to get all of my Q values simultaneously instead of computing each one individually. I expect that column to get more than 100 entries.

have to tried the suggestion in post#5?
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top