Arun Mani A
New Member
Dear All
the below macro not working in excel 2007, please help
-------------------------------------------------------------------------------------------
Edited by Mod: Placed code inside tag.
the below macro not working in excel 2007, please help
Code:
Function zCountif(rng, cell)
Application.Volatile
Set zRange = rng
Set zCell = cell
zValue = cell.Value
zFontColor = zCell.Font.Color
zCellColor = zCell.Interior.Color
zCountif = 0
On Error Resume Next
For Each cell In zRange
If cell.Value = zValue Then
If cell.Font.Color = zFontColor Then
If cell.Interior.Color = zCellColor Then
zCountif = zCountif + 1
End If
End If
End If
Next
On Error GoTo 0
End Function
Edited by Mod: Placed code inside tag.
Last edited by a moderator: