Search code examples
sharepoint-2010

How to create calculated column with data from another list


I have the following situation: List A has two columns (Name, Amount) and in List B (Name) I want to add a calculated column which should be the sum of all entries in List A that have the same name as in List B. Example:

List A:

NAME      Amount
L0011     100
L0011     50
L0020     234

So in List B I want the calculated column to show:

NAME      Amount
L0011     150
L0020     234

How can this be done? Workflow (as soon as I add/mod an entry in List A, update List B) or something else? Thanks


Solution

  • This can't be done using calculated columns because calculated columns can only be used for columns on the same list.

    Using SharePoint Designer Workflows you can just use Create List Item and Update List Item actions so that whenever a user adds a value for L0011 the amount will be added in another list's column which contains the previous amounts already.

    Let me know if you need a more detailed answer for the SharePoint approach and I'll provide you a step by step instruction on what to do.