In all honesty for a single cell calc I think you would want/need a User Defined Function (VBA).
IMO native functions will struggle to handle the non-contiguous sets.
I've been looking at this for a while and though it's relatively straightforward to create a matrix in which names within even columns are discounted, ie:
INDEX(REPT(A1:D5,MOD(COLUMN(A1:D1)-COLUMN(A1),2)=0),0)
utilising that array of values within a unique count is proving beyond me I'm afraid... others may have other ideas.
A user defined function on the other hand would be pretty straightforward, ie:
Function UniqueNames(rngNames As Range, Optional boolCS As Boolean = False) As Long
Dim vbComp As VbCompareMethod, rngCell As Range, strNames As String
vbComp = IIf(boolCS, vbBinaryCompare, vbTextCompare)
For Each rngCell In rngNames.Cells
If rngCell.Value <> "" Then
UniqueNames = UniqueNames - (InStr(1, strNames, "|" & rngCell.Value & "|", vbComp) = 0)
strNames = strNames & "|" & rngCell.Value & "|"
End If
Next rngCell
End Function
the above, stored in a standard Module in a Macro Enabled file, can be called from a cell along the lines of:
=UNIQUENAMES((A1:A5,C1:C5))
note use of brackets encasing the non-contiguous ranges
you can pass an optional 2nd argument to stipulate case sensitivity - presumed insensitive (FALSE) unless otherwise specified
Bookmarks