richlands92
New Member
- Joined
- Feb 24, 2016
- Messages
- 3
Hi guys,
1st time posting so bare with me please.
ill explain what I have then what I want to do if anyone can help please.
im Working With Columns: I,J,K,L Rows 3-42
I - Number 0-3 (0=5days, 1=7days, 2=14days, 3=30days)
J - Start date
K - Days Since Start date
L - estimate ready date
J1 - Today Date - Formula "=Today()"
When number 0-3 is entered in a Cell in Column I,
The Below Code Date Stamps the adjacent cell in Column J (Which Also allows me to change the date if needed) - this part is prefect.
I have a Formula in Column K "=IF($J$1*J20=0,"",SUM($J$1-J20,))"
Which Subtracts the current date from the date entered in Column J and displays the difference between the 2 dates in days.
Then Column L has Formula "=IF(J3=0,"",J3+VLOOKUP(J3,Control!$L$5:$M$9,2,FALSE))"
That Looks up a Table in a tab called Control and adds depending on what number is entered in Column I, days to the date entered in Column K to produce a Estimate ready date.
So My Problem is if I want to change the estimate Ready date But I cant as it will Wipe out the V-look formula.
So it is possible to add thee above Formulas into the below code and for the user to be able to change estimate ready date like im able to do with the Start Date.
Thanks For reading and any Help in This problem!
1st time posting so bare with me please.
ill explain what I have then what I want to do if anyone can help please.
im Working With Columns: I,J,K,L Rows 3-42
I - Number 0-3 (0=5days, 1=7days, 2=14days, 3=30days)
J - Start date
K - Days Since Start date
L - estimate ready date
J1 - Today Date - Formula "=Today()"
When number 0-3 is entered in a Cell in Column I,
The Below Code Date Stamps the adjacent cell in Column J (Which Also allows me to change the date if needed) - this part is prefect.
I have a Formula in Column K "=IF($J$1*J20=0,"",SUM($J$1-J20,))"
Which Subtracts the current date from the date entered in Column J and displays the difference between the 2 dates in days.
Then Column L has Formula "=IF(J3=0,"",J3+VLOOKUP(J3,Control!$L$5:$M$9,2,FALSE))"
That Looks up a Table in a tab called Control and adds depending on what number is entered in Column I, days to the date entered in Column K to produce a Estimate ready date.
So My Problem is if I want to change the estimate Ready date But I cant as it will Wipe out the V-look formula.
So it is possible to add thee above Formulas into the below code and for the user to be able to change estimate ready date like im able to do with the Start Date.
Code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count > 1 Then Exit Sub
If Not Intersect(Range("I3:I42"), .Cells) Is Nothing Then
Application.EnableEvents = False
Me.Unprotect Password:="123"
If IsEmpty(.Value) Then
.Offset(0, 1).ClearContents
Me.Protect Password:="123"
Else
Me.Unprotect Password:="123"
With .Offset(0, 1)
.NumberFormat = "dd-mmm-yy"
.Value = Date
Me.Protect Password:="123"
End With
End If
Application.EnableEvents = True
End If
End With
End Sub
Thanks For reading and any Help in This problem!