Create a formula based on duplicate values
Hello, I need some assistance with a formula.
I have the following sheet with an 'Original SOW#' & 'Approved Change Order Amount' columns. I would like to sum up the Approved Change order Amount by Original SOW#.
Example, for SOW# 012, the subtotal should be $117,000 since I added $67K + $50k from the Approved Change Order amount column.
The above formula should work anytime there is a duplicate value in the Original SOW# (in the above example we have two rows with 012).
Here is the formula I am currently using but not working since I have not figured out a way to find the duplicates:
=SUMIFS([Approved Change Order Amount]:[Approved Change Order Amount], [Original SOW #]: [Original SOW #], CONTAINS([Original SOW #]$1: [Original SOW #], @cell), Status:Status, "Approved")
Thank you
Best Answer

Try with a Collect function:
=Sum(Collect([Approved Change Order Amount]:[Approved Change Order Amount],Status:Status, ="Approved",[Original SOW #]:[Original SOW #],=[Original SOW #]@row)
The thing with this funciton though is that Row 1 and Row 3 will have the same value, the total of all Change order amount.
Answers

Try with a Collect function:
=Sum(Collect([Approved Change Order Amount]:[Approved Change Order Amount],Status:Status, ="Approved",[Original SOW #]:[Original SOW #],=[Original SOW #]@row)
The thing with this funciton though is that Row 1 and Row 3 will have the same value, the total of all Change order amount.

@Christian G. Thank you! It worked.

@ChristianCo. Hi there, in terms of the above formula that you provided, I would like to add an additional parameter. Instead of getting the subtotal by SOW # only, I also would like to get the subtotal based on SOW # AND Vendor Name.
For instance, the following example shows 2 different vendors (Apple and Watermelon). The subtotal for Apple should be $30k, whereas for Watermelon should be $50k.
I am assuming I need to add the 'Vendor Name' component to the formula you provided. Thoughts?
=Sum(Collect([Approved Change Order Amount]:[Approved Change Order Amount],Status:Status, ="Approved",[Original SOW #]:[Original SOW #],=[Original SOW #]@row)
Help Article Resources
Categories
 All Categories
 14 Welcome to the Community
 Smartsheet Customer Resources
 62.8K Get Help
 376 Global Discussions
 207 Industry Talk
 440 Announcements
 4.5K Ideas & Feature Requests
 139 Brandfolder
 129 Just for fun
 130 Community Job Board
 449 Show & Tell
 30 Member Spotlight
 1 SmartStories
 284 Events
 33 Webinars
 7.3K Forum Archives
Check out the Formula Handbook template!