您请求访问的页面目前没有您的语言版本。您可以从页面底部选择其他语言,或使用 Google Chrome 的内置翻译功能将网页内容即时翻译成您选择的语言。

Subtract values from a list

The list-subtract operator (-) will produce a new list with the values of the left-side list that are not present in the right-side list. The values of the resulting list will be in the order they occurred in the original left-side list.

Duplicate result entries will be omitted.
  • ({ 1, 2, 3 } - LIST(2, 3, 4)) produces a list of one Number value: 1. See also: LIST()
  • ({ "Bob", "Mary", "Bob", "Alice" } - { "Alice" }) produces a list of Text values: Bob, Mary. In addition to the requested removal of Alice, note the duplicate occurrence of Bob was also omitted from the result.
  • ({ "Bob", "Mary", "Bob", "Alice" } - LIST()) produces a list of Text values: Bob, Mary, Alice. Note that the duplicate occurrence of Bob was omitted from the result. Equivalent to UNIQUE({ "Bob", "Mary", "Bob", "Alice" }). See also: UNIQUE()
  • ({ "Bob", "Mary", "Bob", "Alice" } - { "Bob" }) produces a list of Text values: Mary, Alice. Note that although Bob only occurs once in the right-side list, both (all) occurrences of Bob from the left-side list are removed in the result.

See also

Combine lists

List expressions

INTERSECT()

UNIQUE()

 

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Main menu
5826773420355871507
true
Search Help Center
false
true
true
true
false
false
false
false
false
⌂ 换网址