Fixed row value using tables

leemwright11185

New Member
Joined
Nov 13, 2018
Messages
2
Hi Everyone,

I am trying to get my spreadsheet to allocate each row in my table with a unique 3 digit reference using =TEXT(ROW(A1),"000"). However I would like to be able to sort the data by date or location etc. without the number changing. I have the below test data but when I sort the column by date order the reference number stays in the same order as previous.

NO.LOCATIONDATE
001ABZ05/10/2018
002DUN01/10/2018
003GTY18/10/2018
004GTY12/10/2018

<tbody>
</tbody>
What can I use so that the number field is fixed at point of new table line being created and it can be sorted etc? Any help appreciated.

Lee.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi & welcome to MrExcel.
One option is to copy/paste the formula as values.
Another option is to use
=TEXT(ROW($A$1),"000")
But this means you wont be able to "fill down" the formula.
 
Upvote 0
Thanks for getting back to me fluff. Unfortunately I had already tried your suggestion. I'm trying to make my spreadsheet as "idiot" proof as possible as we have users here who are not great with computers so I don't trust them to copy and paste it properly.

Can you think of any other ways of automatically creating a unique reference without using the ROW formula perhaps?

TIA
 
Upvote 0
The only other way I can think of to have the numbers "hard coded" would be VBA.
That said I'm not too hot on formulae, so somebody else may have an idea.
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,387
Members
449,080
Latest member
Armadillos

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