Hey Guys,
I currently have the following formula in Column A 1-500
And I have options, Calculations, Iterations set to 1 so everytime I input something in column B todays date auto populates in column A and it does not change each day thanks to the iterations being set at 1. However i recently noticed that there are a few formulas not correctly adding up when I make some changes and when I press save it seems to recalculate correctly. I'm guessing the reason for this is because of the iterations above. If this is correct and makes sense to you then is there a VBA code I could do if I for example "if column B >1 input Date in Column A. Someone previously suggested a DATE code but have no idea how to write it into my existing code (which I got a lot of help writing in the first place) First off would this work and second of all would it stay static or would it change each day?. I need it to stay static. I am not brilliant on VBA so I have attached the current code in a particular sheet and maybe you could show me how to input the new bits around the existing (if it's possible) in the first place.
All suggestions greatly appreciated
Thanks Matt
I currently have the following formula in Column A 1-500
Code:
=IF(E34<>"",IF(A34=" ",TODAY(),A34)," ")
All suggestions greatly appreciated
Thanks Matt
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
Const sPW As String = "$P$2"
Const sHide As String = "I:I, O:O"
If Not Intersect(Target, Range(sPW)) Is Nothing Then
If Target.Value = 1234 Then
ActiveSheet.Unprotect
'Range(sHide & 1).EntireColumn.Hidden = False
Range(sHide).EntireColumn.Hidden = False
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True
ActiveSheet.EnableSelection = xlUnlockedCells
ElseIf Target.Value = "" Then
ActiveSheet.Unprotect
'Range(sHide & 1).EntireColumn.Hidden = True
Range(sHide).EntireColumn.Hidden = True
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True
ActiveSheet.EnableSelection = xlUnlockedCells
End If
End If
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveSheet.Unprotect
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True
ActiveSheet.EnableSelection = xlUnlockedCells
End Sub