Hi there,
I've been asked to revamp the barcode system at work on Google sheets, porting it over from an old Excel document. I understand not all formulae carry over smoothly, and it appears the GTIN-14 that is generated with a formula for our Inner and Outer carton packaging doesn't like the transition.
As an example, a GTIN-13 we have for a retail product is 9350466000009. For the inner carton that those products are packed in, the new barcode has to add a 1 to the beginning.
In the original Excel document, the formula is as follows: =CONCAT("1",(LEFT(F4,LEN(F4)-1)),(MOD(-SUM(MID(CONCAT("1",(LEFT(F4,LEN(F4)-1)))&0,{1,3,5,7,9,11,13;2,4,6,8,10,12,14},1)*{3;1}),10)))
What results is the string: 19350466000006
Bringing the formula over to Google Sheets, I've at least worked out that I need to change CONCAT to CONCATENATE and that at least outputs a 14 digit string, however the new number 19350466000007 doesn't match what was outputted on excel.
I'm hoping this is just a syntax issue, so if someone could please help me rewrite this formula in a way that Google Sheets appreciates, that would be greatly appreciated!
TL;DR: Need to rewrite an excel formula to work for Google sheets. Old excel formula: =CONCAT("1",(LEFT(F4,LEN(F4)-1)),(MOD(-SUM(MID(CONCAT("1",(LEFT(F4,LEN(F4)-1)))&0,{1,3,5,7,9,11,13;2,4,6,8,10,12,14},1)*{3;1}),10))) where F4 is where the data is being referenced from.
I've been asked to revamp the barcode system at work on Google sheets, porting it over from an old Excel document. I understand not all formulae carry over smoothly, and it appears the GTIN-14 that is generated with a formula for our Inner and Outer carton packaging doesn't like the transition.
As an example, a GTIN-13 we have for a retail product is 9350466000009. For the inner carton that those products are packed in, the new barcode has to add a 1 to the beginning.
In the original Excel document, the formula is as follows: =CONCAT("1",(LEFT(F4,LEN(F4)-1)),(MOD(-SUM(MID(CONCAT("1",(LEFT(F4,LEN(F4)-1)))&0,{1,3,5,7,9,11,13;2,4,6,8,10,12,14},1)*{3;1}),10)))
What results is the string: 19350466000006
Bringing the formula over to Google Sheets, I've at least worked out that I need to change CONCAT to CONCATENATE and that at least outputs a 14 digit string, however the new number 19350466000007 doesn't match what was outputted on excel.
I'm hoping this is just a syntax issue, so if someone could please help me rewrite this formula in a way that Google Sheets appreciates, that would be greatly appreciated!
TL;DR: Need to rewrite an excel formula to work for Google sheets. Old excel formula: =CONCAT("1",(LEFT(F4,LEN(F4)-1)),(MOD(-SUM(MID(CONCAT("1",(LEFT(F4,LEN(F4)-1)))&0,{1,3,5,7,9,11,13;2,4,6,8,10,12,14},1)*{3;1}),10))) where F4 is where the data is being referenced from.