i need the below code to be modified little bit
issue 1) the value in A1 and B1 (the user input) is disappearing after macro is run
issue2) if cell 12 already has 1 in it , it should add 1 if the below criteria is met
Code
Sub Timing()
Dim ws As Worksheet
Set ws = Sheet3
Sheet3.Range("A1").Value = Tim1
Sheet3.Range("B1").Value = tim2
' dbTime = Time
If Tim1 > 14 Or tim2 < 24 Then
ws.Cells(1, 12).Value = 1
ws.Cells(1, 13).Value = 1
ws.Cells(1, 14).Value = 1
ElseIf Tim1 > 17 Or tim2 < 24 Then
ws.Cells(1, 15).Value = 69
Else
ws.Cells(1, 16).Value = 69
End If
End Sub
Display More
[COLOR="#0000CD"]Moderation Edit: [/COLOR]Please add code tags to your VBA syntax .. by highlighting the code and Clicking the # button