# 수식 내 와일드카드 문자

## Content

수식에서 와일드카드 문자를 사용해 값을 검색할 수 있습니다. 와일드카드 문자는 조건 인수를 포함하는 수식에서 사용할 수 있습니다.
다음 와일드카드 문자는 함수의 비교 조건으로 사용할 수 있습니다.

| **문자** | **검색 대상** | **예시** |
| --- | ----- | --- |
| ? (물음표) | 임의의 한 문자 | sm?th는 "smith" 및 "smyth"를 찾습니다. |
| \* (별표) | 임의의 여러 문자 (0개 이상의 문자) | \*east는 "Northeast" 및 "Southeast"를 찾습니다. |
| \~ (물결표) 다음에 ?, \*, 또는 \~ 가 올 때 | 물음표(?), 별표(\*) 또는 물결표(\~) 문자 자체 | fy91\~?는 "fy91?"를 찾습니다. |

다음 수식들은 와일드카드 문자를 지원합니다:

* [AVERAGEIF](/spreadjs/docs/v18/formulareference/FormulaFunctions/statistical-functions/AVERAGEIF)
* [AVERAGEIFS](/spreadjs/docs/v18/formulareference/FormulaFunctions/statistical-functions/AVERAGEIFS)
* [COUNTIF](/spreadjs/docs/v18/formulareference/FormulaFunctions/statistical-functions/COUNTIF)
* [COUNTIFS](/spreadjs/docs/v18/formulareference/FormulaFunctions/statistical-functions/COUNTIFS)
* [DAVERAGE](/spreadjs/docs/v18/formulareference/FormulaFunctions/database-functions/DAVERAGE)
* [DGET](/spreadjs/docs/v18/formulareference/FormulaFunctions/database-functions/DGET)
* [DMAX](/spreadjs/docs/v18/formulareference/FormulaFunctions/database-functions/DMAX)
* [DMIN](/spreadjs/docs/v18/formulareference/FormulaFunctions/database-functions/DMIN)
* [DPRODUCT](/spreadjs/docs/v18/formulareference/FormulaFunctions/database-functions/DPRODUCT)
* [DSTDEV](/spreadjs/docs/v18/formulareference/FormulaFunctions/database-functions/DSTDEV)
* [DSTDEVP](/spreadjs/docs/v18/formulareference/FormulaFunctions/database-functions/DSTDEVP)
* [DSUM](/spreadjs/docs/v18/formulareference/FormulaFunctions/database-functions/DSUM)
* [DVAR](/spreadjs/docs/v18/formulareference/FormulaFunctions/database-functions/DVAR)
* [DVARP](/spreadjs/docs/v18/formulareference/FormulaFunctions/database-functions/DVARP)
* [HLOOKUP](/spreadjs/docs/v18/formulareference/FormulaFunctions/lookup-reference-functions/HLOOKUP)
* [MATCH](/spreadjs/docs/v18/formulareference/FormulaFunctions/lookup-reference-functions/MATCH)
* [SEARCH](/spreadjs/docs/v18/formulareference/FormulaFunctions/text-functions/SEARCH)
* [SUMIF](/spreadjs/docs/v18/formulareference/FormulaFunctions/math-trig-functions/SUMIF)
* [SUMIFS](/spreadjs/docs/v18/formulareference/FormulaFunctions/math-trig-functions/SUMIFS)
* [VLOOKUP](/spreadjs/docs/v18/formulareference/FormulaFunctions/lookup-reference-functions/VLOOKUP)

와일드카드 문자는 등호(=)가 있는 문자열과 함께만 사용할 수 있습니다.
다음 코드 예제는 "a"를 포함하는 항목을 검색하기 위해 와일드카드 문자를 사용하는 방법을 보여줍니다.

```JavaScript
activeSheet.setValue(0, 0, 'abc');
activeSheet.setValue(1, 0, 'ac');
activeSheet.setValue(2, 0, 'a*');
 
activeSheet.getCell(0, 1).formula('COUNTIF(A1:A3,"a*")');  //"a"로 시작하는
activeSheet.getCell(1, 1).formula('COUNTIF(A1:A3,"a?")');  //"a" 다음에 한 글자만 오는 경우
activeSheet.getCell(2, 1).formula('COUNTIF(A1:A3,"a~*")'); //" a*"
```