Incremented alphanumeric code for multiple entries google sheets

JTGF

New Member
Joined
Aug 3, 2020
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hello,

I've created a table for warehouse inventory and I wish to automate this as much as possible using google sheets.

Column A: Manual input of the material (with specific info)
Column B: Material Type (This is from a drop down menu created in sheet 2 - the material type is fixe only 10 types)
Column C: Material ID (This is created using PROCV function in sheet 2 - its a two letter code that is associated with the material type)
Column D: Formula to create unique ID ( I was indicated this formula (see example below "=C7&TEXT(COUNTIFS(D$1:D7,C7&"*")+1,"000")") and it works fine for a static dataset, however when you add rows with new information it changes the numbers before.

The idea was to create incremented alphanumeric codes for each material codes as in the example in column D.

Unfortunately, when a new line is added the codes before change too, when they shouldn't.

Is there another way to do this without having this obstacle, and the new added entries follow the logic explained?


Material description (manual input)Material type (drop down)Material ID (ProcV from sheet 2)Material ID number (formula)How it looks in Googlesheets
bananas INDbananasBABA001BA002
apples URGcarrotsCACA001CA001
oranges BRZbananasBABA002BA002
Carrots USbananasBABA003
Apples USapplesAPAP001
CARROTS FRcarrotsCA=C7&TEXT(COUNTIFS(D$1:D7,C7&"*")+1,"000")

Thanks you in advance for your help!!!
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Try this fill down from D2: =C2&TEXT(COUNTIFS(D$1:D1,C2&"*")+1,"000")
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,157
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top