For your last name, your if statement is what is causing it to be blank, at least in your test...There are always 2 names, so the ubound returns 2, which is not equal to 1, so a blank is returned.
Would something like this work:
switch(
ubound(names1) = 1, ProperCase(Names1[1]) ,
ubound(names1) =2, ProperCase(Names1[2]) + " " + ProperCase(Names1[1]) ,
ubound(names1) = 3, ProperCase(Names1[2]) + " " + ProperCase(Names1[3]) + " " + ProperCase(Names1[1])
)
Hope this helps