Formulals
Hi
use the HasFormula property and loop through the range for each cell.
Harlan Grove posted the code below. Maybe this is what you're looking
for:
Function IsFormula(r As Range) As Variant
Dim i As Long, j As Long, rv As Variant
Set r = r.Areas(1) 'since there's no way to handle multiple area
ranges
rv = r.Value
If IsArray(rv) Then
For i = 1 To r.Rows.Count
For j = 1 To r.Columns.Count
rv(i, j) = r.Cells(i, j).HasFormula
Next j
Next i
Else
rv = r.HasFormula
End If
IsFormula = rv
End Function
--
Regards
Frank Kabel
Frankfurt, Germany
"Jahsonn" schrieb im Newsbeitrag
...
How do I test if a range has a formula in it?
thx
|