norie was correct-your sub was wrong not the function

Sub PopulateReportCreatedByIds()
    Dim a, i As Long
    a = Worksheets("REPORT").Range("a1").CurrentRegion
    For i = 2 To UBound(a, 1)
        Worksheets("REPORT").Cells(i, 27).Value = GetPersonId(a(i, 28))
    Next
End Sub
you didn't need Set because you were converting a range into an array of values (and values do not have a Text property which is what caused the error)