JonRowland
Active Member
- Joined
- May 9, 2003
- Messages
- 415
- Office Version
- 365
- Platform
- Windows
Hi Guys,
Am stuck on the following piece of code for what I thought was a straightforward loop.
Basically if row <i>x</i> in Column L isn't blank or 44 then I want to combine it with the value in Column C.
However, the red piece of code is giving me a <b>Compile Error: Expected: expression </b> error which has got me stumped.
Any ideas plse.
Thx
Jon
<code>
Dim CC_Value As String
Dim S_No As String
Dim D_No As String
StartRow = 2
LastRow = Cells.Find("*", Cells(1), xlFormulas, xlWhole, xlByRows, xlPrevious).Row
For Row = StartRow To LastRow Step 1
CC_Value = Cells(Row, 12)
D_No = Cells(Row, 3)
If Cells(2, 16).Value = "Inbound" Then
If CC_Value < 0.5 Then
End If
<font color="red">If CC_Value > 0.5 AND <> "44" Then </font>
Cells(Row, 3).Value = CC_Value & D_No
End If
End If
Next Row
</code>
Am stuck on the following piece of code for what I thought was a straightforward loop.
Basically if row <i>x</i> in Column L isn't blank or 44 then I want to combine it with the value in Column C.
However, the red piece of code is giving me a <b>Compile Error: Expected: expression </b> error which has got me stumped.
Any ideas plse.
Thx
Jon
<code>
Dim CC_Value As String
Dim S_No As String
Dim D_No As String
StartRow = 2
LastRow = Cells.Find("*", Cells(1), xlFormulas, xlWhole, xlByRows, xlPrevious).Row
For Row = StartRow To LastRow Step 1
CC_Value = Cells(Row, 12)
D_No = Cells(Row, 3)
If Cells(2, 16).Value = "Inbound" Then
If CC_Value < 0.5 Then
End If
<font color="red">If CC_Value > 0.5 AND <> "44" Then </font>
Cells(Row, 3).Value = CC_Value & D_No
End If
End If
Next Row
</code>