1 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Can’t figure out how to build UPC-a check digit function

Our take

Struggling to calculate the check digit for a UPC-A barcode? You're not alone. Many users face challenges when creating functions in spreadsheet applications like LibreOffice Calc or Excel. Fortunately, there's a straightforward solution to simplify your task. By using the function `=MOD(-SUM(WRAPROWS(--REGEXEXTRACT(REPT("0",18-LEN(A1))&A1,".",1),2,0)*{1,3}),10)`, you can efficiently calculate the check digit for an 11-digit UPC-A code. This approach can enhance your data management and streamline your

So for work I need to build a function in Libreoffice calc or excel that can calculate a UPC-A barcode check digit. And I cannot for the life of me figure out that function

SOLVED:

=MOD(-SUM(WRAPROWS(--REGEXEXTRACT(REPT("0",18-LEN(A1))&A1,".",1),2,0)*{1,3}),10)

That is the function for an 11 digit upc-a

submitted by /u/jasmynn24
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article