Excel Formula To Generate EAN 13 Digit Barcode Check Digit

I was preparing data in an Excel spreadsheet for import into an OpenBravoPOS database, and needed to generate check digits for my custom EAN-13 barcodes.  Here’s the Excel formula I constructed to generate a 13-digit barcode check digit. It works in Google Sheets too!