Forum Discussion
Automatically Update Date in Cell if Another Cell is Modified
I currently have two other macros on the same worksheet - how does that work? Also, I would like to have the date updated in column I if anything changes in column H. Please note that the workbook constantly fluctuates as far as how many rows it has.
This is what I show currently:
If Target.Column = 10 Then Cells(Target.Row, 8).FormulaR1C1 = "=Vlookup(RC[2],operation,2)"
If Target.Column = 10 Then Cells(Target.Row, 12).FormulaR1C1 = "=if(or(RC[-2] = 12,RC[-2]=6),10,if(or(RC[-2] = 7,RC[-2]=3,RC[-2]=8,RC[-2]=9,RC[-2]=10),9,1))"
End Sub
You enter a formula in column H if column J changes. That will happen each time you change a cell in column J - isn't that overkill. If J4 is changed 37 times, you'd enter the same formula in H4 37 times...
It also means that the user probably won't enter a value in column H directly, so the code that I posted won't work.
- JenniferGuliano_HISCOJan 04, 2024Copper Contributor
I am entering the data into field H & then I want it to know that if I change it, the current date needs to go into column I.
- HansVogelaarJan 04, 2024MVP
But the line
If Target.Column = 10 Then Cells(Target.Row, 8).FormulaR1C1 = "=Vlookup(RC[2],operation,2)"
enters a VLOOKUP formula in column 8 = column H. How does that work together with entering data in column H?
- JenniferGuliano_HISCOJan 04, 2024Copper Contributor
The existing two codes that are in there need to stay as they do something else.