Hi Guys,
I've got a list of passwords that need to be updated at different times, and I'm trying to keep track of them via excel.
The layout will have have Column A for Passwords, Column B for the number of days that the password will last before expiring, column C and D are the date that the password will expire, and Column E will contain the same as Column B.
The goal is that when the password is changed in Column A, Column C and D will update to show when the password will expire. Column E will show the same as Column B.
If the value in Column B changes, then Column C will show the result of "(Col-D minus Col-E) + Col-B". (Essentially adjusting the date that the password will expire.)
I hope this is making sense. If not, maybe the attached document will explain it better.
Currently I have this working using the following:
As you can see, this only works for Row 8. I've attempted to convert this to a range of cells and use offsets but have been unsuccessful. Can anyone assist in making this work for Rows 8-11 in the attached sheet, where it only updates the specific row that the change was made on. If I could use named ranges, that would be ideal, but not essential.![]()
Private Sub Worksheet_Change(ByVal Target As Range) If Target = Cells(8, 1) Then Cells(8, 3) = Date + Cells(8, 2) Cells(8, 4) = Date + Cells(8, 2) Cells(8, 5) = Cells(8, 2) End If If Target = Cells(8, 2) Then Cells(8, 3) = (Cells(8, 4) - Cells(8, 5)) + Cells(8, 2) End If End Sub
Bookmarks