Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 1.01 KB

Excel.Range.HasFormula.md

File metadata and controls

43 lines (28 loc) · 1.01 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Range.HasFormula property (Excel)
vbaxl10.chm144143
vbaxl10.chm144143
Excel.Range.HasFormula
a18bea77-cee9-ae2d-7e97-90a4205e3b1f
05/11/2019
medium

Range.HasFormula property (Excel)

True if all cells in the range contain formulas; False if none of the cells in the range contains a formula; null otherwise. Read-only Variant.

Syntax

expression.HasFormula

expression A variable that represents a Range object.

Example

This example prompts the user to select a range on Sheet1. If every cell in the selected range contains a formula, the example displays a message.

Worksheets("Sheet1").Activate 
Set rr = Application.InputBox( _ 
 prompt:="Select a range on this worksheet", _ 
 Type:=8) 
If rr.HasFormula = True Then 
 MsgBox "Every cell in the selection contains a formula" 
End If

[!includeSupport and feedback]