For those of you in the business of peer reviewing other people’s data entries, the ability to minimize tedious checks is essential. Today we’ll look at how =SUM(ABS(…)) is a convenient tool to reduce a simple 3-step process to a simpler 1-step process.

Your intern has just copied a large table of numbers from Worksheet1 to Worksheet2, and you want to make sure nothing went wrong in the process. In best practice, you’d want to check not only the numbers but also the relative position of the numbers… did the intern switch some rows or columns around? A good system of lookup formulas should be employed to ensure the integrity of this data transfer. However, for now let’s just focus on the most basic case where all we care is that the two tables match identically.

It’s a huge table of 100 rows and 20 columns, so you really don’t want to look at each number with your bare eyes. A typical way to check is to set up a third table of the same dimentions, and subtract the corresponding cells in the two tables:

(Worksheet3!A1) =Worksheet1!A1-Worksheet2!A1

(Worksheet3!A2) =Worksheet1!A2-Worksheet2!A2

….

After that, a quick glance for nonzero values will help you find places where discrepancies exist. This is not difficult or time consuming by any means, but you still have to (1) type in a formula, (2) copy formula to the correct range, and (3) check for nonzero values. Instead, try this array formula:

{=SUM(ABS(Worksheet1!A1:T100-Worksheet2!A1:T100))} (Don’t forget to press CTRL+ALT+Enter)

This formula does an element-wise subtraction of the second table from the first table, and totals the absolute differences into a single number. If the result of this formula is nonzero, then we’ve got a discrepancy problem worth further investigation – otherwise the job is done! The ABS() function here serves an important role at making sure positive discrepancies don’t happen to offset negative discrepancies.

*Related*