I am appreciated if there is someone out there can give me a hand on this!
I am trying to write an VBA in excel; here is the coding:
Sheet1.Cells(5, 5).Select *it will bring me to the cell E5
Selection.Formula = "=A1" *it will enter a formula: "=A1" in the E5
My question is how can I enter a coding like above in cell E5 which gives me an addition of E4 and D5 (ie. to add the cell above my starting postion and the cell on the left). But the command: Selection.Formula="=E4+D5" could not help as I need the formula to be using 'relative address (ie. adding the cell above me and the cell on my left)'' instead of "absolute address (ie. E4+D5)" so that I can use the command on other cell.
I am trying to write an VBA in excel; here is the coding:
Sheet1.Cells(5, 5).Select *it will bring me to the cell E5
Selection.Formula = "=A1" *it will enter a formula: "=A1" in the E5
My question is how can I enter a coding like above in cell E5 which gives me an addition of E4 and D5 (ie. to add the cell above my starting postion and the cell on the left). But the command: Selection.Formula="=E4+D5" could not help as I need the formula to be using 'relative address (ie. adding the cell above me and the cell on my left)'' instead of "absolute address (ie. E4+D5)" so that I can use the command on other cell.
Last edited: