Unique ID for a Row

%3CLINGO-SUB%20id%3D%22lingo-sub-2065351%22%20slang%3D%22en-US%22%3EUnique%20ID%20for%20a%20Row%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2065351%22%20slang%3D%22en-US%22%3E%3CP%3ECould%20someone%20help%20me%20with%20this%20requirement.%3C%2FP%3E%3CP%3EI%20have%20a%20requirement%20to%20create%20a%20UNIQUE%20ID%20for%20each%20row%20I%20add%20to%20a%20table.%20I%20have%20multiple%20tables%20across%20multiple%20excel%20files%2C%26nbsp%3B%20This%20ID%20can%20not%20be%20shared%20with%20any%20other%20files%20in%20any%20other%20tables.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOnce%20the%20Row%20is%20deleted%2C%20the%20Unique%20ID%20is%20deleted%20along%20with%20the%20row%20I%20deleted%20and%20it%20should%20not%20be%20given%20to%20any%20other%20row%20I%20add%20in%20the%20future.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20cannot%20think%20of%20any%20easy%20way%20to%20do%20this.%20I%20do%20not%20want%20to%20use%20VB%20code%20unless%20that%20is%20the%20only%20way%20go%20to%20forward.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2065351%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2065439%22%20slang%3D%22en-US%22%3ERe%3A%20Unique%20ID%20for%20a%20Row%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2065439%22%20slang%3D%22en-US%22%3EHi%2C%20There%20is%20a%20function%20in%20excel%20that%20generate%20random%20number%20between%200%20and%201%2C%20so%20you%20would%20use%20this%20formula%20to%20create%20random%20and%20unique%20number.%20%3DRAND()*100000000000%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2065500%22%20slang%3D%22en-US%22%3ERe%3A%20Unique%20ID%20for%20a%20Row%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2065500%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F87534%22%20target%3D%22_blank%22%3E%40Jihad%20Al-Jarady%3C%2FA%3E%26nbsp%3B%20Thanks%20for%20the%20response.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20do%20have%20the%20requirement%20of%20UNIQUE%20ID%20and%20that%20should%20not%20change%20upon%20recalculation.%20Once%20generated%20and%20assigned%2C%20it%20should%20remain%20the%20same.%20Sorry%20I%20was%20not%20specific%20about%20it%20in%20the%20question%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20I%20am%20not%20wrong%2C%20RAND%20modifies%20the%20assigned%20values%20during%20recalculation.%3C%2FP%3E%3CP%3EI%20thought%20about%20RAND%20initially%20and%20gave%20up%20on%20that%20approach.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Could someone help me with this requirement.

I have a requirement to create a UNIQUE ID for each row I add to a table. I have multiple tables across multiple excel files,  This ID can not be shared with any other files in any other tables.

 

Once the Row is deleted, the Unique ID is deleted along with the row I deleted and it should not be given to any other row I add in the future. 

 

I cannot think of any easy way to do this. I do not want to use VB code unless that is the only way go to forward. 

2 Replies
Hi, There is a function in excel that generate random number between 0 and 1, so you would use this formula to create random and unique number. =RAND()*100000000000

@Jihad Al-Jarady  Thanks for the response.

 

I do have the requirement of UNIQUE ID and that should not change upon recalculation. Once generated and assigned, it should remain the same. Sorry I was not specific about it in the question

 

If I am not wrong, RAND modifies the assigned values during recalculation.

I thought about RAND initially and gave up on that approach.