We can perform dso analysis in excel, but how does it work?

I have realized we can do dso analysis in excel (Days Sales Outstanding) by taking average accounts receivable during the month / net credit sales during the month and multiplying by the number of days (30 days). I can see there could be an accounts receivable if the business has its own credit arrangements with customers, however I don't understand how the DSO formula works?
