D
dusty
G'Day,
I've succesfully created a defined named range using INDIRECT.
I've even created a defined named range using the union of two
INDIRECT expressions (=INDIRECT(FirstName),INDIRECT(SecondName)).
I've also created a defined named range (ShiftedData) with
=INDIRECT(FirstName)+100*Adjustment.
The aim here is to allow modifications to base data to perform
sensitivity analysis.
If I enter {=ShiftedData} into a range of cells, all is well; I get
the same effect as manually adding 100*Adjustment to each value in
INDIRECT(FirstName).
However, where I hit problems is when I try to pass ShifttedData to
any function (e.g. VLOOKUP).
All I get is #Value!
If I try a VBA subroutine and refer to a range via
set rngTest = Range("ShiftedData")
all I get is runtime error 1004, Method 'Range' of object '_Global'
failed.
Is anybody able to explain why adding the constant is fine in one
sense (the values are displayable in the worksheet) but not usable in
VBA?
Thanks for your time,
Clive
I've succesfully created a defined named range using INDIRECT.
I've even created a defined named range using the union of two
INDIRECT expressions (=INDIRECT(FirstName),INDIRECT(SecondName)).
I've also created a defined named range (ShiftedData) with
=INDIRECT(FirstName)+100*Adjustment.
The aim here is to allow modifications to base data to perform
sensitivity analysis.
If I enter {=ShiftedData} into a range of cells, all is well; I get
the same effect as manually adding 100*Adjustment to each value in
INDIRECT(FirstName).
However, where I hit problems is when I try to pass ShifttedData to
any function (e.g. VLOOKUP).
All I get is #Value!
If I try a VBA subroutine and refer to a range via
set rngTest = Range("ShiftedData")
all I get is runtime error 1004, Method 'Range' of object '_Global'
failed.
Is anybody able to explain why adding the constant is fine in one
sense (the values are displayable in the worksheet) but not usable in
VBA?
Thanks for your time,
Clive