# GetExcludedCount

GetExcludedCount() 會找出指定欄位中排除相異值的數量。排除值包括替代選項 (白色或淺黃色)、已排除和所選的已排除 (灰色) 欄位。

語法：

GetExcludedCount (field\_name)

傳回的資料類型： 字串

引數：

* field\_name： 包含待測量資料範圍的欄位。

## 範例

以下範例使用載入至不同列表框的三個欄位，一個用於 First name，另一個用於 Last name，另一個則是 Initials。

範例 1: 未在 First name 中選取任何值

`GetExcludedCount  (Initials) = 0`

沒有任何選項。

範例 2: 已在 First name 中選取 John

`GetExcludedCount  (Initials) = 5`

在 Initials 中有 5 個灰色的排除值。第六個儲存格 (JA) 將是白色，因為它與 First name 中的選項 John 相關。

範例 3: 已在 First name 中選取 John 和 Peter

`GetExcludedCount  (Initials) = 3`

在 Initials 中，John 與 1 值相關，而 Peter 與 2 值相關。

範例 4: 已在 First name 中選取 John 和 Peter，在 Last name 中選取 Franc

`GetExcludedCount ([First name]) = 4`

在名字中有 4 個灰色的排除值。GetExcludedCount() 評估具有排除值的欄位，包括替代選項和所選的排除欄位。

範例 5: 已在 First name 中選取 John 和 Peter，在 Last name 中選取 Franc 和 Anderson

`GetExcludedCount  (Initials) = 4`

在 Initials 中有 4 個灰色的排除值。其他兩個儲存格 (JA 和 PF) 將會是白色或淺黃色，因為這與 First name 中的選項 John 和 Peter 有關。

範例 6: 已在 First name 中選取 John 和 Peter，在 Last name 中選取 Franc 和 Anderson

`GetExcludedCount  ([Last name]) = 4`

在 Initials 中有 4 個排除值。Devonshire、Brown、Carr 和 Elliot 是灰色。

範例中使用的資料：

`Names:` `LOAD * inline [` `"First name"|"Last name"|Initials|"Has cellphone"` `John|Anderson|JA|Yes` `Sue|Brown|SB|Yes` `Mark|Carr|MC |No` `Peter|Devonshire|PD|No` `Jane|Elliot|JE|Yes` `Peter|Franc|PF|Yes ] (delimiter is '|');`