Hi guys, this time encounter a question of
how to use the range.address (as variable) in range.function
as I want to "type" the formula into the cell, instead of the calculated value
here is my lastest code
Code
Dim wst As Worksheet
Set wst = Workbooks("test.xlsx").Worksheets("sheet1")
i = wst.Range("A5").End(xlDown).Row 'find last row
wst.Cells(i, "B").Formula = "=if("& wst.cells(i,"K").address "=""red"",""Yes"",""No"")" 'want to get the address and include in the shown formula
End Sub
However, I can't make the formula works.
Any expert has ideas?