cactus
03-16-2011, 06:21 AM
Hi,
I have a very simple UDF that counts non merged cells in a specific range, but it dont recalculate if i change (merge) a new cell in the range...(calculation is set to automatic)
The only way to get the recalculation is editing the cell with the formula...
Any idea?
Function Ocupadas(celda As RANGE) As Integer
Application.Volatile
B = 0
For Each cel In celda.Cells
a = cel.MergeCells
If a = True Or cel.Value <> "" Then
B = B
Else
B = B + 1
End If
Next
Ocupadas = B
End Function
Thanks in advance
I have a very simple UDF that counts non merged cells in a specific range, but it dont recalculate if i change (merge) a new cell in the range...(calculation is set to automatic)
The only way to get the recalculation is editing the cell with the formula...
Any idea?
Function Ocupadas(celda As RANGE) As Integer
Application.Volatile
B = 0
For Each cel In celda.Cells
a = cel.MergeCells
If a = True Or cel.Value <> "" Then
B = B
Else
B = B + 1
End If
Next
Ocupadas = B
End Function
Thanks in advance