I am trying to set the value in the cell to the right of the last cell in a range but it isn't working. Can someone see what I'm doing wrong?
Set oWorkbook = Workbooks.Open(TextFile)
Set oRange = ActiveWorkbook.Worksheets(1).UsedRange
For i = 1 To oRange.Rows.Count
Set oCurRow = oRange.Rows(i)
For Each oCell In oCurRow.Cells
If oCell.Value = sCusip Then
oCurRow.Columns(i, oCurRow.Columns.Count).Offset(0, 1).Value = "Y"