Code:
Dim Column_L_L As Long
Set ws = Sheets("Members")
Column_L_L = ws.Range("A" & Rows.Count).End(xlUp).Row
ws.Range("L2:L" & ws.Range("A" & Rows.Count).End(xlUp).Row).Formula = _
"=YEARFRAC(K2, TODAY(), 1)"
ws.Calculate
This bit of code creates an issue in my project.
If cells in ColumnK are blank, adjoining cell L values = 119. This producing undesired results later in the project.
In an attempt to resolve this issue, I’ve revised the formula to:
“=IF(K2="”,"”,(YEARFRAC(K2,TODAY(),1)))”
In Runtime, the formula populates as:
“=IF(K2=",",(YEARFRAC(K2,TODAY(),1)))”
This is puzzling. What am I doing wrong?