You are here:

Excel/How do I get result with a value

Advertisement


Question
SISC-SH
SISC-SH  
QUESTION: How do I get the result of multiple items meeting the same criteria? Payroll frequently makes corrections to the summer hold contribution which shows in addition to the regular contribution on multiple lines for the same employee. I am not getting the result of the normal contribution or the combination of regular and corrected contributions. All I get is #VALUE!
How do I make the formula work correctly?
=SUMIFS('7-31'!$E$4:$E$1600,'7-31'!$A$4:$K$1600,A4,'7-31'!$A$4:$K$1600,BZ4)
I attached a larger picture.  Thank you

ANSWER: Sandra,

I looked closer at your formula and now see you are Using  $A$4:$K$1600.  All ranges must match in terms of the number of cells addressed.  Your first argument is a single column and the other ranges are multiple columns.  This is a mismatch and will cause a #Value error.

Suggest you add columns to the right of your source data that evaluate across columns A:K for that row whether it should be included in your count.  Then you could check the new single column for the first condition and another new single column for the second condition.






--
Regards,
Tom Ogilvy






---------- FOLLOW-UP ----------

QUESTION: OK, now I get a value of 0 instead of the word VALUE. But it is not the correct result. There are multiple rows that meet the criteria in BZ4 (HLTH)for this employee and the end result for medical items in column E should be 100.00 instead of 0.When I have the correct formula, I will need to adjust it for the next two columns to obtain the combined result from each of those columns. When corrections are posted they double the rows used because the employee portion and the employer portion of the correction cannot be processed in the same entry.

Should I be using another function to obtain the combined result from multiple rows for one employee that match the criteria in column BZ?

Thank you

Answer
If I was checking column A for the employee identifier found in A4 of the sheet with the formula and column B for the condition indicator found in BZ4 on sheet with the formula and returning values in column E I would use this.  (Assume data is on Sheet2).  

=sumifs(Sheet2!$E$4:$E$1600,Sheet2!$A$4:$A$1600,A4,Sheet2!$B$4:$B$1600,BZ4)

Now if I also wanted to collect values from column F for the same conditions I would just do this:

=SUM(SUMIFS(Sheet2!$E$4:$E$1600,Sheet2!$A$4:$A$1600,A4,Sheet2!$B$4:$B$1600,BZ4),SUMIFS(Sheet2!$F$4:$F$1600,Sheet2!$A$4:$A$1600,A4,Sheet2!$B$4:$B$1600,BZ4))

As far as getting zero, are you sure the values in column E as stored a numbers rather than text.  In other words, the cell could contain the string 123 ("123") and that won't sum.  If it holds the number 123, then it will sum.   The would look the same.

--
Regards,
Tom Ogilvy

About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Tom Ogilvy

Expertise

Selected as an Excel MVP by Microsoft since 1999. Answering Excel questions in Allexperts since its inception in 2001. Able to answer questions on almost all aspects of Excel's internal capabilities. If seeking a VBA solution, please specify that in your question itself so I give you the answer you want. [Excel has weak protection - if you are distributing an application, I don't answer questions on how to protect your project from your users.]

Experience

Extensive experience.

Education/Credentials
Master of Science (MS) degree Operations Research (ORSA)

Awards and Honors
Microsoft MVP in Excel.

©2016 About.com. All rights reserved.