---
title: Text.InferNumberType – ตรวจสอบชนิดข้อมูลของข้อความตัวเลข
url: https://www.thepexcel.com/functions/power-query/text-functions/text-infernumbertype/
type: function-explainer
program: Power Query
syntax: "Text.InferNumberType(text as text, optional culture as nullable text) as type"
date: 2025-12-04
updated: 2025-12-17
scores:
  popularity: 5
  difficulty: 3
  usefulness: 5
---

# Text.InferNumberType – ตรวจสอบชนิดข้อมูลของข้อความตัวเลข

> ตรวจสอบและระบุชนิดข้อมูลตัวเลข

## คำอธิบาย

Text.InferNumberType ใช้สำหรับตรวจสอบว่าข้อความแสดงตัวเลขชนิดใด เช่น Int64, Double, Decimal หรือ Single เป็นประโยชน์สำหรับการแปลงข้อมูลโดยอัตโนมัติ

## Syntax

```excel
Text.InferNumberType(text as text, optional culture as nullable text) as type
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| text | Yes | text |  | ข้อความที่ต้องการตรวจสอบชนิดตัวเลข |
| culture | No | nullable text | null | รหัสวัฒนธรรม (เช่น 'en-US', 'th-TH') สำหรับการแปลตามท้องถิ่น |

## เคสการใช้งาน

### แปลงข้อมูลข้อความเป็นตัวเลขโดยอัตโนมัติ

แปลงข้อมูลข้อความเป็นตัวเลขโดยอัตโนมัติ

### ตรวจจับประเภทข้อมูลในอัลกอริทึม auto-detect

ตรวจจับประเภทข้อมูลในอัลกอริทึม auto-detect

### จัดการสกุลเงิน เปอร์เซ็นต์ และรูปแบบตัวเลขอื่นๆ

จัดการสกุลเงิน เปอร์เซ็นต์ และรูปแบบตัวเลขอื่นๆ

## ตัวอย่าง

### 1. ตรวจสอบตัวเลขเต็ม

```excel
Text.InferNumberType("123")
```

**ผลลัพธ์:** `Int64.Type`

'123' คือจำนวนเต็ม (Int64)

### 2. ตรวจสอบจำนวนทศนิยม

```excel
Text.InferNumberType("123.45")
```

**ผลลัพธ์:** `Double.Type`

'123.45' คือจำนวนทศนิยม (Double)

### 3. ตรวจสอบหนึ่งเปอร์เซ็นต์

```excel
Text.InferNumberType("50%")
```

**ผลลัพธ์:** `Double.Type`

'50%' จะแปลเป็น 0.5 (Double)

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

- [Value.FromText – แปลง Text เป็น Value](https://www.thepexcel.com/functions/power-query/text-functions/value-fromtext/)
- [Number.FromText – แปลงข้อความเป็นตัวเลข](https://www.thepexcel.com/functions/power-query/number-functions/number-fromtext/)

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

- [Microsoft Learn: Text.InferNumberType](https://learn.microsoft.com/en-us/powerquery-m/text-infernumbertype) _(Official Documentation)_

---

_Source: [https://www.thepexcel.com/functions/power-query/text-functions/text-infernumbertype/](https://www.thepexcel.com/functions/power-query/text-functions/text-infernumbertype/)_
