What is the SIGN function?
=SIGN(number)SIGN returns 1 for a positive number, 0 for zero and -1 for a negative number.
Use it to see the direction of a change or to put a sign back on another number. Click a value in column A; column B shows the same formula copied down.
SIGN is handy for showing whether a figure went up or down, or for branching on profit versus loss. It only ever returns -1, 0 or 1, which makes it easy to combine with CHOOSE or IF to show a different label for each direction.
Arguments
- number
- The number or cell.
SIGN examples
Example 1. Direction of change
=SIGN(C2-B2)1 if this month went up, -1 if it went down.
Example 2. Keep the sign
=SIGN(A2)*ROUND(ABS(A2),0)Round the size and keep the sign.
Example 3. Month-on-month arrows
=CHOOSE(SIGN(C2-B2)+2, "↓", "→", "↑")Adding 2 to SIGN gives 1, 2 or 3, which CHOOSE turns into an arrow.
Last month B2 This month C2 SIGN(C2-B2) Shown 120 150 1 ↑ 150 150 0 → 150 90 -1 ↓ Example 4. Count the months that grew
=SUMPRODUCT(--(SIGN(C2:C13-B2:B13)=1))Counts how many of 12 months beat the month before.
Common mistakes
Confusing it with ABS
ABS removes the sign; SIGN keeps only the sign.
Text
Anything that is not a number returns #VALUE!.
Tiny calculation errors
With decimals, a difference that looks like 0 can leave a tiny remainder, so SIGN returns 1 or -1. Round first: =SIGN(ROUND(C2-B2, 2)).
FAQ
- What about 0?
- It returns 0.
- Can IF do this?
- Yes: =IF(A2>0,1,IF(A2<0,-1,0)) is the same.
- How do I flip the sign?
- Use -A2 or =A2*-1. SIGN is not needed.