I am new to airtable and I am using airtable as our Products database, and when we make a new product it needs to get a EAN-13 barcode. We get the first 9 numbers from the government, then we add the next 3 and the last one is calculated.
Field 1 = 9 first diget
Field 2 = auto number
Field 3 = adding “0” so the cell has 3 number in it
Field 4 = Field 1 & Field 3
Field 5 = calculated last number
Field 6 = Field 4 & Field 5
The formula is:
CEILING((VALUE(MID({EAN+rad},1,1))*1)+(VALUE(MID({EAN+rad},2,1))*3)+(VALUE(MID({EAN+rad},3,1))*1)+(VALUE(MID({EAN+rad},4,1))*3)+(VALUE(MID({EAN+rad},5,1))*1)+(VALUE(MID({EAN+rad},6,1))*3)+(VALUE(MID({EAN+rad},7,1))*1)+(VALUE(MID({EAN+rad},8,1))*3)+(VALUE(MID({EAN+rad},9,1))*1)+(VALUE(MID({EAN+rad},10,1))*3)+(VALUE(MID({EAN+rad},11,1))*1)+(VALUE(MID({EAN+rad},12,1))*3),10)-((VALUE(MID({EAN+rad},1,1))*1)+(VALUE(MID({EAN+rad},2,1))*3)+(VALUE(MID({EAN+rad},3,1))*1)+(VALUE(MID({EAN+rad},4,1))*3)+(VALUE(MID({EAN+rad},5,1))*1)+(VALUE(MID({EAN+rad},6,1))*3)+(VALUE(MID({EAN+rad},7,1))*1)+(VALUE(MID({EAN+rad},8,1))*3)+(VALUE(MID({EAN+rad},9,1))*1)+(VALUE(MID({EAN+rad},10,1))*3)+(VALUE(MID({EAN+rad},11,1))*1)+(VALUE(MID({EAN+rad},12,1))*3))
This formula works for this but dose any one know if there is a easier way to do this.