Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Natural laws have no pity.


computers / microsoft.public.excel.misc / Re: How can I Calculate Check Digit for UPC A - the 13th warrior

SubjectAuthor
* Re: How can I Calculate Check Digit for UPC A - the 13th warriorBill Scheurer
`- Re: How can I Calculate Check Digit for UPC A - the 13th warriorJon Culley

1
Re: How can I Calculate Check Digit for UPC A - the 13th warrior

<4282230f-0470-4081-83dc-7f1f330e90ccn@googlegroups.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=987&group=microsoft.public.excel.misc#987

  copy link   Newsgroups: microsoft.public.excel.misc
X-Received: by 2002:a05:620a:24d1:b0:759:1a9f:f1bf with SMTP id m17-20020a05620a24d100b007591a9ff1bfmr1088134qkn.13.1683912376232;
Fri, 12 May 2023 10:26:16 -0700 (PDT)
X-Received: by 2002:a05:620a:1a9c:b0:757:6864:6d0 with SMTP id
bl28-20020a05620a1a9c00b00757686406d0mr7228723qkb.4.1683912375967; Fri, 12
May 2023 10:26:15 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: microsoft.public.excel.misc
Date: Fri, 12 May 2023 10:26:15 -0700 (PDT)
In-Reply-To: <1164868424.940214.67830@16g2000cwy.googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:245:4103:9790:3941:9961:8e72:bbf3;
posting-account=S6Bv8AkAAACn_BEMIw1DhJ_hRFw60Hgz
NNTP-Posting-Host: 2601:245:4103:9790:3941:9961:8e72:bbf3
References: <1164868424.940214.67830@16g2000cwy.googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4282230f-0470-4081-83dc-7f1f330e90ccn@googlegroups.com>
Subject: Re: How can I Calculate Check Digit for UPC A - the 13th warrior
From: billscheurer@gmail.com (Bill Scheurer)
Injection-Date: Fri, 12 May 2023 17:26:16 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2402
 by: Bill Scheurer - Fri, 12 May 2023 17:26 UTC

On Thursday, November 30, 2006 at 12:33:44 AM UTC-6, AIRJACK wrote:
> I found this great formula (below) for calculating the 12th (check
> digit) for a 12 digit upc code and then yielding the entire code
> including 12th digit. Does anybody know how to modify or alter this
> formula to calculate the 13th digit (check digit) for a 13 digit UPC A
> code and yield the entire code including the 13th digit?
> =A1&MOD(10-MOD(SUMPRODUCT(MID(A1,ROW($1:$11),1)*
> (1+2*MOD(ROW($1:$11),2))),10),10)
>
> The long way is:
> Stating as example the following code: 739007812345
> Start by adding every other figure from the right and then multiply by
> 3.
> 5 + 3 + 1 + 7 + 0 + 3 = 19 * 3 = 57
> After this add the rest of the figures:
> 4 + 2 + 8 + 0 + 9 + 7 = 30
> Add the above results 57 + 30 = 87
> Next reduce this amout 87 from the closest higher ten (90) and you
> receive 90 - 87 = 3
> 3 is the check digit.
> Thanks,
> M. Jack

M. Jack, this formula for Excel works brilliantly!

Is there an equivalent one for Google Sheets?

One that uses the applicable functions they offer.

Re: How can I Calculate Check Digit for UPC A - the 13th warrior

<981037f0-8512-472d-8654-d25e496a8388n@googlegroups.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1879&group=microsoft.public.excel.misc#1879

  copy link   Newsgroups: microsoft.public.excel.misc
X-Received: by 2002:ad4:4b32:0:b0:66d:32cc:3736 with SMTP id s18-20020ad44b32000000b0066d32cc3736mr10841qvw.4.1699651396070;
Fri, 10 Nov 2023 13:23:16 -0800 (PST)
X-Received: by 2002:a05:620a:1981:b0:773:ae7f:ae60 with SMTP id
bm1-20020a05620a198100b00773ae7fae60mr14442qkb.12.1699651395824; Fri, 10 Nov
2023 13:23:15 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: microsoft.public.excel.misc
Date: Fri, 10 Nov 2023 13:23:15 -0800 (PST)
In-Reply-To: <4282230f-0470-4081-83dc-7f1f330e90ccn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=184.68.159.82; posting-account=UHuErwoAAADxQNihw6LinN3Xeg3bIOP2
NNTP-Posting-Host: 184.68.159.82
References: <1164868424.940214.67830@16g2000cwy.googlegroups.com> <4282230f-0470-4081-83dc-7f1f330e90ccn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <981037f0-8512-472d-8654-d25e496a8388n@googlegroups.com>
Subject: Re: How can I Calculate Check Digit for UPC A - the 13th warrior
From: jculley@bigboxoutletstore.ca (Jon Culley)
Injection-Date: Fri, 10 Nov 2023 21:23:16 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2065
 by: Jon Culley - Fri, 10 Nov 2023 21:23 UTC

It's tedious because GSheets doesn't handle array formulas the same way, and once you declare your number to be text, MID() returns text, so you have to convert it back into an Integer...

=MOD(10-MOD(SUM(SUM(INT(MID(A1,1,1)),INT(MID(A1,3,1)),INT(MID(A1,5,1)),INT(MID(A1,7,1)),INT(MID(A1,9,1)),INT(MID(A1,11,1)))*3,INT(MID(A1,2,1)),INT(MID(A1,4,1)),INT(MID(A1,6,1)),INT(MID(A1,8,1)),INT(MID(A1,10,1))),10),10)

--
This e-mail message and any attachments are proprietary and confidential
information intended only for the use of the recipient(s) named above. If
you are not the intended recipient, you may not print, distribute, or copy
this message or any attachments. If you have received this communication in
error, please notify the sender by return e-mail and delete this message
and any attachments from your computer.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor