Solved

Add an Argument to this SUMIFS function

Posted on 2014-07-21
2
124 Views
Last Modified: 2014-07-21
Hi Experts:

How would I modify this SUMIFS Function to subtract fields in "HisDataSUM" in which the values in column C were equal to the values in column D?

SUMIFS(HisDataSum!$A:$A,HisDataSum!$B:$B,IF(D13="All","<>0",D13),HisDataSum!$C:$C,IF(D14="All","<>0",D14),HisDataSum!$E:$E,IF(D16="All","<>0",D16) - X,

Using all the same criteria for cells D13, D14, and D16 X needs to Sum the values in HisDataSum column A only in the instances where the values in column C = column D.

If there is an easier way to do this; such as forget about the subtraction and only sum if column C <> column D that will work as well!

Thanks in advance!
0
Comment
Question by:-Polak
2 Comments
 
LVL 23

Accepted Solution

by:
NBVC earned 500 total points
ID: 40209671
In order to use SUMIFS (and whole column references), you would need to add a helper column which flags when column C is equal to column C.... for example =IF(C2=D2,"Match","Not Matched")

Then you can add that check in your original.

e.g.

SUMIFS(HisDataSum!$A:$A,HisDataSum!$B:$B,IF(D13="All","<>0",D13),HisDataSum!$C:$C,IF(D14="All","<>0",D14),HisDataSum!$E:$E,IF(D16="All","<>0",D16,HisDataSum!$X:$X,"<>Match")

where X:X is flag column used...

Otherwise, you would need to use SUMPRODUCT and limit range sizes.
0
 
LVL 1

Author Closing Comment

by:-Polak
ID: 40209780
Flag column created, and it works, not the most elegant, but certainly better than limiting range sizes!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question