DaveBlakeMAAT
Board Regular
- Joined
- Feb 28, 2016
- Messages
- 190
Hi all
I currently have a formula as listed below within my VBA script which all works great, however, when it populates the formula into the cell it inserts the underlying value of the named range instead of referencing the named range. The named range "MinimumIncomeThreshold" is pointing to an individual cell.
This means that the formula is not dynamic!
Does anyone know how I can correct this?
ps: I do not want to reference the cell address directly in my VBA code as this will break if someone decides to be "helpful" and insert new rows!!
Regards
Dave
I currently have a formula as listed below within my VBA script which all works great, however, when it populates the formula into the cell it inserts the underlying value of the named range instead of referencing the named range. The named range "MinimumIncomeThreshold" is pointing to an individual cell.
This means that the formula is not dynamic!
Code:
Range("M3", LastFormulaCell).Formula = "=IF(B3<" & [COLOR="#FF0000"]Range("MinimumIncomeThreshold")[/COLOR] & ",""Below Threshold"",MATCH(A3,list!$A$2:$A$1048576,0)+1)"
Does anyone know how I can correct this?
ps: I do not want to reference the cell address directly in my VBA code as this will break if someone decides to be "helpful" and insert new rows!!
Regards
Dave