How do i retain it from changing my formulas into Values.
The only value change should be (i, 14) or Column N
The only value change should be (i, 14) or Column N
VBA Code:
Option Explicit
Sub btnStk_Click()
Dim rData As Range, arrData
Dim i As Long
Dim sName As Long
Dim sNote As String
Set rData = Sheets("Inventory").Range("A3").CurrentRegion
arrData = rData.Value
For i = 2 To UBound(arrData)
If Len(arrData(i, 14)) > 0 And VBA.IsNumeric(arrData(i, 14)) Then
arrData(i, 7) = arrData(i, 7) + arrData(i, 14)
If Val(arrData(i, 14)) > 0 Then
sNote = "Stock Added"
Else
sNote = "Stock Removed"
End If
' Clear column C
Sheets("Log").Range("A" & Rows.Count).End(xlUp).Offset(1).Resize(1, 5).Value _
= Array(Now(), Environ("UserName"), sNote, arrData(i, 3), arrData(i, 14))
arrData(i, 14) = ""
End If
Next
rData.Value = arrData
End Sub