---
title: DEC2HEX – แปลงฐาน 10 เป็นฐาน 16
url: https://www.thepexcel.com/functions/excel/engineering/dec2hex/
type: function-explainer
program: Excel
syntax: "=DEC2HEX(number, [places])"
date: 2025-12-02
updated: 2025-12-17
scores:
  popularity: 3
  difficulty: 5
  usefulness: 4
---

# DEC2HEX – แปลงฐาน 10 เป็นฐาน 16

> แปลงฐาน 10 เป็นฐาน 16

## คำอธิบาย

ฟังก์ชัน DEC2HEX ใน Excel ใช้สำหรับแปลงเลขฐานสิบ (Decimal) เป็นเลขฐานสิบหก (Hexadecimal) ซึ่งมักใช้ในการเขียนโปรแกรม การกำหนดสีในเว็บ (RGB/Hex code) และระบบคอมพิวเตอร์.

## Syntax

```excel
=DEC2HEX(number, [places])
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| number | Yes | Number |  | เลขฐานสิบ |
| places | No | Number | 0 | จำนวนหลัก |

## ตัวอย่าง

### 1. แปลงเลขฐาน

```excel
=DEC2HEX(255)
```

**ผลลัพธ์:** `FF`

255 คือค่าสูงสุดของ 2 หลักฐานสิบหก

### 2. แปลงเลขฐาน (with different value)

```excel
=DEC2HEX(127)
```

**ผลลัพธ์:** `Check formula`

Similar to previous example but with different input values. Formula: =DEC2HEX(127) returns Check formula.

### 3. แปลงเลขฐาน (with variation 2)

```excel
=DEC2HEX(63)
```

**ผลลัพธ์:** `Check formula`

Similar to previous example but with different input values. Formula: =DEC2HEX(63) returns Check formula.

## ฟังก์ชันที่เกี่ยวข้อง

- [HEX2DEC – แปลงฐาน 16 เป็นฐาน 10](https://www.thepexcel.com/functions/excel/engineering/hex2dec/)
- [DEC2BIN – แปลงตัวเลขฐาน 10 เป็นฐาน 2](https://www.thepexcel.com/functions/excel/engineering/dec2bin/)
- [DEC2OCT – แปลงฐาน 10 เป็นฐาน 8](https://www.thepexcel.com/functions/excel/engineering/dec2oct/)
- [BASE – แปลงเลขฐาน](https://www.thepexcel.com/functions/excel/math-and-trigonometry/base/)
- [DECIMAL – แปลงเป็นเลขฐาน 10](https://www.thepexcel.com/functions/excel/math-and-trigonometry/decimal/)

## แหล่งข้อมูลเพิ่มเติม

- [Official Documentation](https://support.microsoft.com/en-us/office/dec2hex-function-6344ee8b-b6b5-4c6a-a672-f64666704619) _(official)_
- [ExcelJet](https://exceljet.net/excel-functions/excel-dec2hex-function) _(guide)_

---

_Source: [https://www.thepexcel.com/functions/excel/engineering/dec2hex/](https://www.thepexcel.com/functions/excel/engineering/dec2hex/)_
