Functions returning values to target cells in MS-Excel are scalar by nature - i.e. they can return only one value..
One option would be for the function to concatenate multiple results in a single string separated by delimiters and use string manipulation functions in excel to extract relevant values across cells (by predefined formula entries in the target cells)
Other option would be to convert your scalar function to take in a target range and populate the values within that function/subroutine itself..