I have 2 functions:
get_list
populates a list of site domains to excel sheet in column Aget_traffic
calls API for each site and populates that to column B next to the relevant site domain
Problem is that function 2 (get_traffic
) doesn't wait for function 1 (get_list
) to finish before starting, and therefore I'm not getting the data I need.
My question is: how can I make a function wait for another function to finish before running?
code:
get_list(wb)
get_traffic(wb)
Thank you!