
EngineeringLevel: IntermediateAvailable in: Excel 2007+
In this article
- Syntax
- Examples
- Example 1
- Related functions
DEC2HEX converts numbers to hex — the notation behind web colours and memory addresses.
Syntax
=DEC2HEX(number, [places])
| Argument |
What it means |
places |
Pad with leading zeros. |
Examples
Example 1
="#"&DEC2HEX(A2,2)&DEC2HEX(B2,2)&DEC2HEX(C2,2)
RGB 255, 128, 0 becomes #FF8000.
HEX2DEC · DEC2BIN
📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.
✨ Ask AI about this articleStuck on a step? Ask a question and the AI answers using this article.
Free · AI can be wrong