You need to coerce the True/False values to numbers
=SUM(--(A1:A4=A3))
But there is no need for an array formula, you can simply use COUNTIF
=COUNTIF(A1:A4,A3)
How about a UDF
Public Function CountDuplicates(rng As Range) As Boolean
Dim TextLen As Long
Dim WordCount As Long
Dim WordLen As Long
Dim UniqueWordCount As Long
Dim NextWord As String
Dim coll As Collection
Dim i As Long
TextLen = Len(rng.Value)
WordCount = TextLen - Len(Replace(rng.Value...
Private prevCell As Range
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not prevCell Is Nothing Then
If prevCell.Address = "$A$2" Then
Call myMacro
End If
End If
Set prevCell = Target
End Sub
This is worksheet event code.
To implement it, select the sheet tab, right...
Normally a class module would be used to abstract a specific part of the design. Say for instance that you wanted to create a custom object that would be used throughout your code. You would create a class with all of the required methods and properties, test this within a simple test harness...
This will be quicker still
Sub CLEAN()
Dim xLong As Long, csht As Long
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Application.EnableEvents = False
With ActiveWorkbook
For csht = 1 To .Worksheets.Count
With .Worksheets(csht).UsedRange
xLong =...
Create another named range called countries with this data
Australia AU
Canada CA
France FR
Germany DE
United Kingdom UK
United States US
and use
=IF(ISERROR(VLOOKUP(fl,INDIRECT(VLOOKUP(countryLink,countries,2,FALSE)&"pp"),2,FALSE)),""...