---
title: BASE – แปลงเลขฐาน
url: https://www.thepexcel.com/functions/excel/math-and-trigonometry/base/
type: function-explainer
program: Excel
syntax: "=BASE(number, radix, [min_length])"
date: 2025-12-02
updated: 2025-12-17
scores:
  popularity: 5
  difficulty: 2
  usefulness: 6
---

# BASE – แปลงเลขฐาน

> แปลงเลขฐาน

## คำอธิบาย

แปลงตัวเลขฐาน 10 เป็นข้อความในฐานอื่น (Base 2-36) เช่น แปลงเลข 10 เป็นฐานสอง ('1010') หรือฐานสิบหก ('A')

## Syntax

```excel
=BASE(number, radix, [min_length])
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| number | Yes | Number |  | ตัวเลข |
| radix | Yes | Number |  | ฐาน (2-36) |
| min_length | No | Number | 0 | ความยาวขั้นต่ำ |

## ตัวอย่าง

### 1. แปลงเป็นฐานสอง (Binary)

```excel
=BASE(10, 2)
```

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

แปลงเลข 10 ฐานสิบ ให้เป็นเลขฐานสอง

### 2. แปลงเป็นฐานสิบหก (Hex)

```excel
=BASE(255, 16)
```

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

เลข 255 ในฐานสิบหกคือ FF (สูงสุดของ 8-bit)

### 3. กำหนดความยาวขั้นต่ำ

```excel
=BASE(7, 2, 8)
```

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

แปลงเลข 7 เป็นฐานสอง แต่บังคับให้แสดงผลครบ 8 หลัก (เติม 0 ด้านหน้า)

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

- [BIN2DEC – แปลงเลขฐานสองเป็นฐานสิบ](https://www.thepexcel.com/functions/excel/engineering/bin2dec/)
- [BITLSHIFT – เลื่อนบิตซ้าย (Bit Shift Left)](https://www.thepexcel.com/functions/excel/engineering/bitlshift/)
- [BITRSHIFT – เลื่อนบิตขวา (Right Bit Shift)](https://www.thepexcel.com/functions/excel/engineering/bitrshift/)
- [DEC2BIN – แปลงตัวเลขฐาน 10 เป็นฐาน 2](https://www.thepexcel.com/functions/excel/engineering/dec2bin/)
- [DEC2HEX – แปลงฐาน 10 เป็นฐาน 16](https://www.thepexcel.com/functions/excel/engineering/dec2hex/)

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

- [Official Documentation](https://support.microsoft.com/en-us/office/base-function-2ef61411-aee9-4f29-a811-1c42456c6342) _(official)_
- [ExcelJet](https://exceljet.net/excel-functions/excel-base-function) _(guide)_

---

_Source: [https://www.thepexcel.com/functions/excel/math-and-trigonometry/base/](https://www.thepexcel.com/functions/excel/math-and-trigonometry/base/)_
