Serial Locking

Copper Contributor

I have an array of data in a column in the form,

 

1/20-21
2/20-21
3/20-21
4/20-21
5/20-21
6/20-21
7/20-21
8/20-21
9/20-21
10/20-21
11/20-21
12/20-21
13/20-21

 

 

I would like to lock the column so that it only takes values next in the serial, for example, the next value should only be taken as 14/20-21. I need to lock the column so that it doesn't take any other value apart from the next number in the serial on the left side ( /20-21 stays common). 

 

Can someone help?

2 Replies

@SG_1996515 

In some situations, and why not with array functions, the use of the blade guard may be undesirable. In order to protect cells with formulas or any other cells from unwanted changes in these cases, the following procedure can be used.

 

Use the Format cells / Protection command to define which cells should be provided with cell protection and which should not. To remove the cell protection, simply remove the tick when locked.

 

Select the desired cell range or all cells in the worksheet.

 

Now open the corresponding dialog window via the menu Data / Data tools / Data verification / Data verification.

 

Under Allow, select the Custom entry and enter the following formula: = NOT (CELL ("Protection"; A1))

 

With a click on the OK button, the defined cells are now protected as desired.

 

Important:
The procedure presented protects the cells from accidentally overwriting the cells. However, the locked cell can still be deleted with the delete key. Protected cells can also be overwritten using the copy and paste function. The function presented is therefore not a particularly good protection, but is sufficient in practice in many cases.

 

 

Additional Info:

VBA Excel - How to lock specific cells but allow filtering and sorting

https://stackoverrun.com/de/q/2689186

 

 

I would be happy to know if I could help.

 

Nikolino

I know I don't know anything (Socrates)

 

* Kindly Mark and Vote any reply if it helps please, as it will be beneficial to more Community members reading here.

@SG_1996515 

Since your data set is neither Number nor Date , are a uncommon/customize list then the  best I would like to suggest is,, in any blank range  create list from 1/20-21 to 100/20-21 or which ever is suitable to you. 

Select the data range where you want to enter Serial no ( here is AF2:A16), then Go to Data Validation and for Criteria, select the LIST, and select the data range (here is Y2:Y16) where you have stored your custom list,, and finish with Ok.

 

Rajesh-S_0-1606129094706.png

Another should use this formula, for data Validation as CUSTOM option, will  help you to maintain UNIQUE Serial number list and will check and validate first 2 digits only,,, and allow the pattern /20-21 with all.

=COUNTIF($A$2:$A$100, A2)<=1

Note: 

  • Range A2:A100 where you want to enter Serial number.   
  • Start with 1/20-21 in A2 and continue.