I have a spreadsheet that I need help writing the correct VBA code to allow for a cell containing a formula to be overwritten with hard coded data. To explain I have a cell that calculates a date however from time to time I need to override that calculated date with a hard coded date. The two cells that contain the formula are G22 and G24, respectively. One or the other or both, from time to time, may need to have the calculated value overwritten with a hard coded date.
The formula I am using in each cells to calculate the date is as follows:
G22 | =IF(F22="","",(DATE(YEAR(F22)+1,MONTH(F22),DAY(F22))-1))
G24 | =IF(F24="","",(DATE(YEAR(F24)+1,MONTH(F24),DAY(F24))-1))
Any help would be most appreciated.
The formula I am using in each cells to calculate the date is as follows:
G22 | =IF(F22="","",(DATE(YEAR(F22)+1,MONTH(F22),DAY(F22))-1))
G24 | =IF(F24="","",(DATE(YEAR(F24)+1,MONTH(F24),DAY(F24))-1))
Any help would be most appreciated.