How do I make this Code apply / work after saving and closing the Workbook?
Code:
' This Sub is automatically called when there is any change on this worksheet.
' If the change causes the value of any cell in column E to exceed 1, then the value of the
' the same cell in column H replaces the formula in that cell.
Public Sub Worksheet_Change(ByVal Target As Range)
' Check to see if the change occurred in column E
If Target.Column = 5 Then
' Check to see if the change caused the value to go above 0
If Target.Value > 0 Then
' Assign the value of the corresponding cell in column B back to the cell as a value
' This is effectively the same as copy then "paste as value"
Cells(Target.Row, 8).Value = Cells(Target.Row, 8).Value
End If
End If
End Sub
Welcome to the forum, Joseph.
Please take a few minutes to read the forum rules, and then edit your post to add CODE tags and to have a descriptive title.
Thanks.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
Duplicate of this one.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks