Engineering
All versions
◉ 9 views
=HEX2OCT()
Converts a hexadecimal number to octal.
Applies To:
Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2021Excel 2021 for MacExcel 2019Excel 2019 for MacExcel 2016
=HEX2OCT(number, [places])
Hover argument names in the table for details.
Output typeNumber/Text
Popularity44 / 100
VolatileNo
Dynamic ArrayNo
📥 Download sample .xlsx — Coming soon
▦ Try in Playground
Dedicated file for this function — safe & lightweight · sample data + live formulas
⬇ Download Sample Workbook
A dedicated .xlsx for =HEX2OCT() with Persian sample data & live formulas — open in Excel and practice.
- Sheet “Sample” — data table + formula in place
- Sheet “Guide” — syntax, arguments & tips from this page
- Instant & secure (token + rate limit)
🧠 🧠 Quiz this function
%d questions — syntax, example & errors — test yourself!
◧ Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
number |
Text | Required | The hexadecimal number you want to convert. Number cannot contain more than 10 characters. The most significant bit of number is the sign bit. The remaining 39 bits are magnitude bits. Negative numbers are represented using two's-complement notation. |
places |
Number | Optional | The number of characters to use. If places is omitted, HEX2OCT uses the minimum number of characters necessary. Places is useful for padding the return value with leading 0s (zeros). |
▣ Examples
تبدیل هگزادسیمال F به اکتال با ۳ نویسه (صفر ابتدایی به عنوان پرکننده)
=HEX2OCT("F", 3)
تبدیل هگزادسیمال 3B4E به اکتال
=HEX2OCT("3B4E")
تبدیل هگزادسیمال FFFFFFFF00 به اکتال
=HEX2OCT("FFFFFFFF00")
✦ Tips
- If number is negative, HEX2OCT ignores places and returns a 10-character octal number.
- If number is negative, it cannot be less than FFE0000000, and if number is positive, it cannot be greater than 1FFFFFFF.
- If places is not an integer, it is truncated.
⚠ Common Errors
#NUM!
If number is not a valid hexadecimal number, HEX2OCT returns the #NUM! error value. If HEX2OCT requires more than places characters, it returns the #NUM! error value. If places is negative, HEX2OCT returns the #NUM! error value.
Fix: Valid hex
#VALUE!
If places is nonnumeric, HEX2OCT returns the #VALUE! error value.
Fix: برای places یک مقدار عددی وارد کنید.
💬 Comments & Q&A 0 approved
🔒 Your comment will be published after review.Share your thoughts — visible after admin approval
No comments yet — be the first!