I have a formula in Col H as follows:
I have tried to write code to copy the non-blank values in Col H and paste these as values in Col C
I get a run time error "Application defined or object-defined eerror"
The code below is highlighted
It would be appreciated if someone could kindly amend my code
Code:
=IF(OR(C2=1,C2=-1),B2/0.14,"")
I have tried to write code to copy the non-blank values in Col H and paste these as values in Col C
I get a run time error "Application defined or object-defined eerror"
The code below is highlighted
It would be appreciated if someone could kindly amend my code
Code:
.Range(.Cells(i, 8)).Copy
Code:
Sub copyNonBlankData()
Dim LR As Long, i As Long
LR = Sheets(3).Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To LR
If Sheets(3).Cells(i, 8) <> “” Then
With Sheets(3)
.Range(.Cells(i, 8)).Copy
.Range(.Cells(i, 3)).PasteSpecial xlPasteValues
End With
End If
Next i
Application.CutCopyMode = False
End Sub