Sum average networkdays if cells aren't empty

  • Dear,


    Column G4:G503 all contain a start date
    Column H4:H503 all contain an end date


    What formula could I use to calculate the average difference between all these dates ?


    Quote

    =NETWORKDAYS(G4;H4)

    works for the first cell but this needs to be done over all forementioned cells without using a helper column
    It should also need to check first for empty values; if one of the dates isn't filled in, there should be no result


    Thanks in advance,


    Maarten