M
marston.gould
I have a user entry worksheet where the user can enter a series of
values across any number of rows and 6 columns.
Once a number has been entered into any cell - the values available in
the other 5 within the same row may be restricted.
(Likewise, if it is cleared, it would be "less" restricted - depending
on other cross cell value validation limits).
My thought was to build a routine that
1) Watches to see if any value or "clearing" of contents occurs in the
range in question and then find the values within the same row (This I
have done)
2) After either of the above events, set the validation on each cell
within the row based on the other values entered (or cleared).
My only guide for setting this validation is by watching an Excel
created macro on a single cell based on a range and then repeating that
process for each cell.
In all likelihood, I'm talking about probably 200 or so rows so 1200
cells.
I have the validation rules stored in a series of two dimenional
arrays, for instance:
array1(n, 1) = column 1 value
array1(n,2) = columm 2 value
There are repeats of the same value in both columns and their are 4
arrays like array1 - three with two column restrictions, 1 with three
column restrictions and in some cases the columns restricted are in
multiple arrays (e.g.
array1(n,1) = column 1 value
array2(n,1) = column 1 value
array1(n,2) = column 2 value
array3(n,1) = column 2 value
etc.
values across any number of rows and 6 columns.
Once a number has been entered into any cell - the values available in
the other 5 within the same row may be restricted.
(Likewise, if it is cleared, it would be "less" restricted - depending
on other cross cell value validation limits).
My thought was to build a routine that
1) Watches to see if any value or "clearing" of contents occurs in the
range in question and then find the values within the same row (This I
have done)
2) After either of the above events, set the validation on each cell
within the row based on the other values entered (or cleared).
My only guide for setting this validation is by watching an Excel
created macro on a single cell based on a range and then repeating that
process for each cell.
In all likelihood, I'm talking about probably 200 or so rows so 1200
cells.
I have the validation rules stored in a series of two dimenional
arrays, for instance:
array1(n, 1) = column 1 value
array1(n,2) = columm 2 value
There are repeats of the same value in both columns and their are 4
arrays like array1 - three with two column restrictions, 1 with three
column restrictions and in some cases the columns restricted are in
multiple arrays (e.g.
array1(n,1) = column 1 value
array2(n,1) = column 1 value
array1(n,2) = column 2 value
array3(n,1) = column 2 value
etc.