Excel like a finance pro.
← The libraryPractice · 2 questions →
Engineering function
HEX2DEC
Converts a hexadecimal number to decimal.
Rarely usedDifficulty 1200 · ProficientUsage rank #350 of 520
When to use it
Converts a hexadecimal text (up to 10 characters) to decimal, with negatives in two's complement.
The shape of it
- Syntax
=HEX2DEC(number)
Worked examples
Simple
=HEX2DEC("FF") → 255
Two hex digits.
Mixed
=HEX2DEC("A5") → 165
Mixed digits.
Negative
=HEX2DEC("FFFFFFFFFF") → -1
Ten Fs is -1.
Worth knowing
- Colors: HEX2DEC(MID(color,1,2)) pulls the red channel from "FF8800".
- DECIMAL(text,16) handles longer strings.
- Case does not matter.
Where it goes wrong
- #NUM! for more than 10 characters or invalid digits.
- A leading "0x" or "#" is not allowed; strip it first.
Related
Learn the moves here — or let Wauvel run them on your numbers.
Meet your AI CFO →One CFO-grade Excel tip a week
A short, practical email for finance operators — functions, shortcuts, and the moves that save an afternoon. Free, unsubscribe anytime.