For Each cell in Range
I have not been able to use this structure myself if the Named Range is
dynamic. It seems that it only works for fixed ranges.
"tim" wrote:
Howdy,
Seems so simple, but gives the "run time error 1004". "defined_Range" is a
dynamic range in the workbook.
Dim myCell as Range
For Each myCell In Range("Defined_Range")
If IsEmpty(myCell) Then
myCell.Formula = "=Int(rand()*500+1"
myCell.Formula = myCell.Value
End If
Next rCell
Regards,
Tim
|