Refer to http://www.contextures.com/xlDataVal05.html
Refer to http://www.mrexcel.com/forum/excel-questions/188444-auto-increment-source-range-drop-down-list-box.html
One way is to define a 'dynamic' named range via insert/name/define and use a formula like this instead of a cell reference. the range will be then accomodate additions. mustn't include blank cells or have anything else in the column though. this starts at cell A1 using column.
= Offset (mysheet! $ A $1,0, 0, counta (mysheet! $ A: $ A), 1)
1. Create and save a workbook (mylists.xls, in this example)
2. Enter a list of names in cells A1: A2 on sheet 1.
3. To createDynamicRange, Choose Insert | Name | define (or formulas | Name manager |)
4. UseEmployeesAs the range name, and the following formula:= Offset (sheet1! $ A $1,0, 0, counta (sheet1! $ A: $ A), 1)
5. In another sheet, in one cell, choose data | data validation | allow list, and Source: = employees (Note: Please Donot Forget=), And click OK
PS:
= Offset function:
Returns a reference to a range that is a specified number of rows and columns from a cell or range of cells. the reference that is returned can be a single cell or a range of cells. you can specify the number of rows and the number of columns to be returned.
Syntax
OFFSET(reference, rows, cols, [height], [width])
The offset function syntax has the following arguments (argument: A value that provides information to an action, an event, a method, a property, a function, or a procedure .):
- ReferenceRequired. The reference from which you want to base the offset. Reference must refer to a cell or range of adjacent cells; otherwise, offset returns the # value! Error value.
- RowsRequired. the number of rows, up or down, that you want the upper-left cell to refer. using 5 as the rows argument specifies that the upper-left cell in the reference is five rows below reference. rows can be positive (which means below the starting reference) or negative (which means the starting reference ).
- ColsRequired. the number of columns, to the left or right, that you want the upper-left cell of the result to refer. using 5 as the Cols argument specifies that the upper-left cell in the reference is five columns to the right of reference. cols can be positive (which means to the right of the starting reference) or negative (which means to the left of the starting reference ).
- HeightOptional. The height, in number of rows, that you want the returned reference to be. height must be a positive number.
- WidthOptional. The width, in number of columns, that you want the returned reference to be. Width must be a positive number.
= Counta function:
The Excel counta function returns a count of non-Blanks within a supplied set of cells or values.
The function is commonly used to return the number of non-blank cells in a range. however, as well as ranges of cells, the counta function can directly stored ed arrays of values, which are not stored in cells.
Counta (value1, [value2],...)
Where the arguments, value1, [value2], etc, can be any values or references to cell ranges.