I have a programmer developed database that I need to update on occasion. There is currently a field that is being input from Access VB into the Excel document that is writing a "hard" field". Instead I want a calculation. I want the cell to read the following formula when complete:
=IF(K102<L102,"Below",IF(K102>N102,"Above","In"))
What I have in Access so far is:
.Range("Base_RangeFit").Offset(n, 0).Formula = "= if(" & Replace(.Range("FTE_Base_Salary").Offset(n, 0).Address, "$", "") & "<" & Replace(.Range("Base_Lower").Offset(n, 0).Address, "$", "") & ", "Below" , if(" & Replace(.Range("FTE_Base_Salary").Offset(n, 0).Address, "$", "") & ">" & Replace(.Range("Base_Upper").Offset(n, 0).Address, "$", "") & ", "Above" , "In" ))"
The problem lies in the Red text. I can't have the quotations, because it is using quotations to give the instructions. Problem is I need the quotations in the Excel formula.
Any ideas?
=IF(K102<L102,"Below",IF(K102>N102,"Above","In"))
What I have in Access so far is:
.Range("Base_RangeFit").Offset(n, 0).Formula = "= if(" & Replace(.Range("FTE_Base_Salary").Offset(n, 0).Address, "$", "") & "<" & Replace(.Range("Base_Lower").Offset(n, 0).Address, "$", "") & ", "Below" , if(" & Replace(.Range("FTE_Base_Salary").Offset(n, 0).Address, "$", "") & ">" & Replace(.Range("Base_Upper").Offset(n, 0).Address, "$", "") & ", "Above" , "In" ))"
The problem lies in the Red text. I can't have the quotations, because it is using quotations to give the instructions. Problem is I need the quotations in the Excel formula.
Any ideas?