J
joes
Hello
I have 2 named ranges and I like to have a validation in a cell (list
validation) wich refers to both ranges. The named ranges are on
different pages (sheets). I like not to use a separate 3rd column as
temporary source (which has alle entries from the other two names
ranges). Instead I like to merge named ranges ad hoc with some
vbscript. Exists there a way?
i.e. the following is just for illustration
Validation Function "As List"
=mergeRanges(rangeA;rangeB)
function mergeRanges(r1 as Range, r2 as Range) As Range
Dim rTarget = new Range
' merge the two ranges r1,r2 to rTarget
mergeRanges = rTarget
end Function
I have 2 named ranges and I like to have a validation in a cell (list
validation) wich refers to both ranges. The named ranges are on
different pages (sheets). I like not to use a separate 3rd column as
temporary source (which has alle entries from the other two names
ranges). Instead I like to merge named ranges ad hoc with some
vbscript. Exists there a way?
i.e. the following is just for illustration
Validation Function "As List"
=mergeRanges(rangeA;rangeB)
function mergeRanges(r1 as Range, r2 as Range) As Range
Dim rTarget = new Range
' merge the two ranges r1,r2 to rTarget
mergeRanges = rTarget
end Function