HAS

Short answer

Check whether a value is anywhere in a list

HAS(array, value)
Excel version
Insiders
Also searched as
hasany, hasall, check if value is in list, value exists in range, is item in list excel, check required approvers, flatten, in-cell list functions

What it returns

HAS returns TRUE if value appears in array and FALSE if it does not. One question, one logical answer: is this cost center on the list?

HASANY and HASALL ask the same question about several values at once. HASANY returns TRUE when at least one of the values is in the array. HASALL returns TRUE only when every one of them is. The strictness rises from HAS to HASANY to HASALL.

Matching is on whole items. A search for "CC-41" does not match "CC-410". There is no partial or wildcard match described for these functions.

These functions are in preview. Microsoft announced them on September 24, 2026, alongside lists and arrays held inside a single cell, for Beta Channel users on Windows (Version 2610, Build 20520.20000 or later) and Mac (Version 16.114 or later). They are not in the generally available release of Microsoft 365, and they are not in Excel 2024 or any perpetual version. Microsoft says preview behavior may change and advises against using these features in important workbooks until they are generally available.

Arguments that matter

ArgumentRequiredWhat it does
arrayYesThe list to search. Designed for the new in-cell lists, where one cell holds several items.
valueYesHAS only. The single item to look for, such as [@CostCenter].
valuesYesHASANY and HASALL. The items to look for, from a range or from another list cell.

The full syntax of the siblings:

=HASANY(array, values)
=HASALL(array, values)

All three return a logical. That makes them drop straight into IF, FILTER’s include argument, or a check row, with no >0 comparison and no ISNUMBER wrapper.

In a financial model

Membership tests are everywhere in a model, and most of them are written in a way that hides the question.

  • Is this cost center on the restructuring list?
  • Is this account in the set that gets eliminated on consolidation?
  • Has this journal been signed off by both required approvers?
  • Is this customer one of the strategic accounts that get a separate revenue line?

Today those tests read as COUNTIF(list, x)>0 or ISNUMBER(MATCH(x, list, 0)). Both work. Neither says “is it in the list” to the reviewer who inherits the file. HAS says exactly that.

The in-cell list feature is what these functions were built for. A single cell can hold a list, such as the approvers on a journal or the entities a contract covers, and HASALL checks that every required name is present. That fits approval controls and contract coverage checks, which today usually need a helper column per required item.

The other function in the release is FLATTEN, written FLATTEN(array, [pad_value], [levels]). It removes one or more levels of nesting from a nested array and spills the items into the grid, with pad_value filling the gaps when rows hold different numbers of items. It will get its own page once in-cell lists reach general availability.

Nested array calculations also need the workbook set to Compatibility Version 3 (Formulas, Calculation Options). Microsoft notes that some existing formulas return different results under it.

For a model that leaves your desk, keep the legacy formula. The person you send it to almost certainly does not have the Insider build.

Worked example

A headcount file with a Table Staff holding EmployeeID, CostCenter and Cost. A one-column Table Restructure lists the cost centers in scope for a reorganization. Add a flag column to Staff:

=HAS(Restructure[CostCenter], [@CostCenter])
EmployeeIDCostCenterCostInScope
E1042CC-41096,000TRUE
E1077CC-21582,500FALSE
E1103CC-41071,200TRUE
E1150CC-530104,000TRUE

With Restructure holding CC-410 and CC-530. The cost in scope then sums by the flag:

=SUMIFS(Staff[Cost], Staff[InScope], TRUE)

Here that returns 271,200.

An approvals check. A Table JE has a column Approvers, where each cell holds an in-cell list of the people who signed. The two required sign-offs sit in Req!$B$2:$B$3:

=HASALL([@Approvers], Req!$B$2:$B$3)

TRUE when both required approvers are in the list, FALSE otherwise. Count the FALSE results in the check row, per build a check row and make it loud.

Old way vs new way

The membership flag with today’s functions, which works in every version:

=COUNTIF(Restructure[CostCenter], [@CostCenter])>0

The preview version:

=HAS(Restructure[CostCenter], [@CostCenter])

Same TRUE or FALSE. The HAS version states the question instead of encoding it as a count. Until HAS ships to your whole audience, the COUNTIF line is the one to put in a shared model.

Where it breaks

HAS returns #NAME?. Your Excel does not have the function. That is the normal case in late 2026: HAS, HASANY, HASALL and FLATTEN exist only in Insider preview builds. Fix: use COUNTIF(list, x)>0 or ISNUMBER(XMATCH(x, list)) in any file someone else will open.

A model that worked on your machine shows #NAME? for the reviewer. You built with a preview function and sent the file to someone on the standard release. Fix: before sharing, search the workbook for HAS and replace it with the legacy test, or keep preview functions off any tab that leaves your desk.

HAS returns FALSE for a code that is clearly in the list. The code is stored as a number on one side and as text on the other, or one side carries a trailing space. Whole-item matching treats these as different items. Fix: clean the type where the data lands, in Power Query, and match the mapping table’s convention per one mapping table per dimension.

HAS returns FALSE for part of a code. Matching is on whole items, so "CC-4" will not find "CC-410". Fix: test the whole code, or use a text function for prefix rules.

A formula behaves differently after an Insider update. Preview features can change between builds. Fix: keep preview work in a sandbox file until the function reaches general availability.

Related functions

  • XMATCH. ISNUMBER(XMATCH(x, list)) is the generally available membership test, and returns the position when you need it.
  • MATCH. ISNUMBER(MATCH(x, list, 0)) is the same test in every Excel version. Always write the 0.
  • COUNTIFS. Counts how many times a value appears. Reach for it when duplicates matter, not only presence.
  • FILTER. Lists the rows that pass or fail a membership test, for the check tab.
  • XLOOKUP. When you want an attribute from the list, not a yes or no.
  • The play on build a check row and make it loud covers where membership checks belong.

All functions