View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Matthew Dyer Matthew Dyer is offline
external usenet poster
 
Posts: 178
Default sloppy code help

test = ownershp(midd, site)
Range("a" & i).Value = team
Range("b" & i).Value = owner

so i built a UDF ownershp() that returns two different variables (team and owner) based on two other variables (parent site, child midd). currently, i have to use the test = line to run the function. variables team and owner are public so that my code can use them in the main sub as well as the udf. how can i clean it up to not need to use the test = line? test does nothing else other than allow me to call the udf and it bugs me... there has to be a better way