# Sum calculation based on matching criteria

1. ## Sum calculation based on matching criteria

Hi

I need to sum all the values in one column that have the same corresponding name variable in another column. I then need to calculate the mean value of the sum values sharing a common name.

Example.

35-House-46
67-House-46
36-House-46
86-Car-68.5
46-Car-68.5
86-Car-68.5
56-Car-68.5
58-Bike-62.6
43-Bike-62.6
87-Bike-62.6

Thanks in advance for any help.

Patrick.

2. ## Re: Sum calculation based on matching criteria

AverageIf Method [Excel 2007 Developer Reference]
Returns the average (arithmetic mean) of all the cells in a range that meet a given criteria.

http://msdn.microsoft.com/en-us/libr...ffice.12).aspx

Regards

3. ## Re: Sum calculation based on matching criteria

You might be able to use a PivotTable, but it would help to see a sample workbook

4. ## Re: Sum calculation based on matching criteria

This is a duplicate of your other posts, I strongly recommend that you actually read the Forum Rules that you agreed to when you joined.

5. ## Re: Sum calculation based on matching criteria

@TMShuks

Thanks for your suggestion. Could you please elaborate on how I can tell excel to calculate the mean for a range of cells sharing the same name variable, I need excel to separate all names automatically as I am working with such a large data set.

Patrick

6. ## Re: Sum calculation based on matching criteria

Originally Posted by royUK
This is a duplicate of your other posts, I strongly recommend that you actually read the Forum Rules that you agreed to when you joined.

Sorry If I have broken another rule, I thought my other posts had been closed by moderators and so I had to make a new post.

I will now fully consult the rules.

Regards

7. ## Re: Sum calculation based on matching criteria

I'm not sure I can elaborate without an example workbook.

It's even hard to explain without an example ... you would start, I think, by extracting a list of unique values that you want to get the average of their corresponding values. This could be done using an Advanced Filter or by using a formula.

A sample workbook would give a better idea of what you are working with and what options are appropriate.

Regards

8. ## Re: Sum calculation based on matching criteria

@TM Shucks

I can email you a sample of my workbook if this might help you see what i am trying to do.

Patrick.

9. ## Re: Sum calculation based on matching criteria

Patrick - upload it to the Forum > Go Advanced > Manage Attachments. then more people can have a look and you get more chances of assistance!

10. ## Re: Sum calculation based on matching criteria

Sample data sheet now up. For every different STward_code I need to find the corresponding IMD score. Note that most STward_code's occur more than once so I need to find the average corresponding IMD score.

Hope this helps.

11. ## Re: Sum calculation based on matching criteria

No attachment, try zipping it

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1