How do you use a variable in a formula?
I have a variable:
I have a function called CalcTime(start,end), and I need to insert that into mlastRow. I am attempting
I either get an undefined error or the cell is =CalcTime(KlastRow,LlastRow) versus =Calctime(K4,L4) depending where and how many quotes I add
I have a variable:
Code:
lastRow = Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Row
I have a function called CalcTime(start,end), and I need to insert that into mlastRow. I am attempting
Code:
Range("M" & lastRow).Formula = "=CalcTime("K"&lastRow,"L"&lastRow)"
Last edited: