.HasField()
Check whether an Excel entity exposes a particular field.
Syntax
=value.HasField(field_name)Worked example
In a supported preview build, test whether the batch record contains a field named Units.
=ENTITY("Batch 17","Units",24).HasField("Units")Result TRUE
Microsoft documentation
Check the arguments, supported editions and behavior of this function in Microsoft’s reference.
Microsoft referenceNew =FORMATNUMBER function and Build Your Own DataTypes
This chapter shows .HasField() in Excel’s menu of available entity methods.
Practice .HasField()
Suppose A2 contains a rich Excel entity. Check whether it has a field named "Units" using its dot method.
| A | B | |
|---|---|---|
| 1 | Entity | |
| 2 | Batch 17 |
Show example formula
=A2.HasField("Units") Lesson quiz
Answer three questions to see your level in this lesson.
