You are here:

Excel/How do I get result with a value


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?
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.

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

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).  


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


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.

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


All Answers

Answers by Expert:

Ask Experts


Tom Ogilvy


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.]


Extensive experience.

Master of Science (MS) degree Operations Research (ORSA)

Awards and Honors
Microsoft MVP in Excel.

©2017 All rights reserved.