With the below code I'm looping an array and if condition met to change array value. I'm receiving an error 424 on the line of changing value. Any ideas?
sub test()
Dim arrAccSof As Variant
arrAccSof = .Range(.Cells(3, 1), .Cells(MaxRowAccSof, 4))
For j = LBound(arrAccSof) To UBound(arrAccSof)
If IsEmpty(arrAccSof(j, 3)) Then
arrAccSof(j, 3).Value = 0
End If
If IsEmpty(arrAccSof(j, 4)) Then
arrAccSof(j, 4).Value = 0
End If
Next j
end sub