Here's a short procedure to show the syntax
Code:
Sub testPlus()
Dim n1(2, 1) As String
n1(0, 0) = "John"
n1(0, 1) = "Samantha"
n1(1, 0) = "Tom"
n1(1, 1) = "" 'Tom does not have a spouse
n1(2, 0) = "Jeremiah"
n1(2, 1) = "Danika"
For i = 0 To 2
'
'The next line shows one syntax to do what you want
'
Debug.Print n1(i, 0) + IIf(Len(n1(i, 1) & "") = 0, "", " and " & n1(i, 1))
'
Next i
End Sub
'there is always a first name, so move it to output
'The iif is saying
if the length of the spouse name is 0, then add nothing to the output
if the length of the spouse name is >0, then add the "and " & spouse name to the output
Here is the output
Code:
John and Samantha
Tom
Jeremiah and Danika