Features of !SEMTools
↑ Навигация по задачам в Excel и возможностям надстройки !SEMTools ↑

ABS

ABS function in Excel - examples and returned values
ABS function and its returned values
Function categoryMath and trigonometry
VolatilityNon-volatile

See also, and don't confuse with: ABC analysis in Excel

What does the ABS function do

The ABS function returns the absolute value of a number. By definition, the absolute value is always a positive number. The absolute value of a negative number equals the number multiplied by -1.

ABS function syntax

=ABS(number)
ABS: the number without its sign
B2=ABS(A2)
AB
1NumberABS
2-55=ABS(A2)
33.23.2=ABS(A3)
400=ABS(A4)
5-0.750.75=ABS(A5)
6-12001200=ABS(A6)

Negative numbers lose the minus sign, positive numbers and zero stay as they are. Text that can’t be read as a number returns #VALUE!.

ABS formula examples

Example 1

Call center manager's table using ABS function
Call center manager's table with ABS function

The table above was created by a call center manager to identify problematic hours in their operation.

The manager's task is to minimize human resources spent while maintaining maximum speed in answering incoming calls.

The table shows the average customer waiting time on the line. Both sharp increases from hour to hour and sharp decreases in this metric are bad signals.

Column D uses simple subtraction of the previous hour's value.

The manager uses the ABS function to identify hours when the difference is maximum, in order to adjust employee schedules and "smooth out" the graph.

Example 1: hour-to-hour jumps
D9=ABS(C9)
ABCD
1HourWait, secChangeAbsolute change
29:0035
310:00427=B3-B27=ABS(C3)
411:0040-2=B4-B32=ABS(C4)
512:007131=B5-B431=ABS(C5)
613:0066-5=B6-B55=ABS(C6)
714:0048-18=B7-B618=ABS(C7)
815:00524=B8-B74=ABS(C8)
916:009543=B9-B843=ABS(C9)

Column C keeps the sign: a drop and a rise of the same size look different. ABS in column D puts them on one scale, so the biggest jumps (20+ seconds, highlighted) are easy to find — at 12:00 and 16:00.

Conditional formatting helps quickly identify that some employees should be kept for an extra hour at 16:00 on this day, and more employees should be scheduled at the very beginning of the shift.

Example 2.

ABS function in array formula example
Example 2 - ABS function in array formula

The same manager uses a similar table but for all days of the week. To avoid cluttering the table with extra calculations, they use the ABS function in an array formula.

How does the calculation work in the formula? First, the absolute value is calculated for each array element using the ABS function, and then these absolute values are summed.

Like all array formulas, this formula is entered without curly braces, but the cell entry is done using Ctrl + Shift + Enter.

The formula calculates the cumulative value of "problematic" hours during each day and allows the manager to identify days with the most unbalanced schedule.

Example 2: ABS inside an array formula
G4=SUMPRODUCT(ABS(C4:F4-B4:E4))
ABCDEFG
1Day10:0012:0014:0016:0018:00Total jumps
2Mon3542714895106=SUMPRODUCT(ABS(C2:F2-B2:E2))
3Tue40414443457=SUMPRODUCT(ABS(C3:F3-B3:E3))
4Wed3060326433121=SUMPRODUCT(ABS(C4:F4-B4:E4))

C:F minus B:E gives the four hour-to-hour changes, ABS removes their signs, and the sum shows how uneven the day was. Tuesday is the smoothest; Wednesday swings the most. SUMPRODUCT works without Ctrl+Shift+Enter; in Excel 365 =SUM(ABS(C2:F2-B2:E2)) works as a normal formula too.

Other Math and trigonometry functions

SIGN, MMULT, ISODD, GCD, LCM, CEILING, FLOOR, ROUND, ROUNDUP, ROUNDDOWN, MROUND, MOD, TRUNC, PI, PRODUCT, ROMAN, RANDBETWEEN, RAND, POWER, SUM, SUMIF, SUMPRODUCT, FACT, INT, QUOTIENT, ISEVEN, COMBIN

See also:

Like the article? Help its author! Buy !SEMTools, it has lots of useful instruments to process text data.