I need to search a spreadsheet for the value "n", then move one row up, and insert the value "0.00".
My code below fails, as excel expects something like
If .Value = "n" Then .Value = 0
Please advise how I get it to move up one cell first, before replacing the value.
For rwIndex = 1 To 300
For colIndex = 1 To 300
With Worksheets("WHA").Cells(rwIndex, colIndex)
If .Value = "n" Then .Offset(-1, 0).Select .Value = 0
End With
Next colIndex
Next rwIndex
Thanks in advance.
David
My code below fails, as excel expects something like
If .Value = "n" Then .Value = 0
Please advise how I get it to move up one cell first, before replacing the value.
For rwIndex = 1 To 300
For colIndex = 1 To 300
With Worksheets("WHA").Cells(rwIndex, colIndex)
If .Value = "n" Then .Offset(-1, 0).Select .Value = 0
End With
Next colIndex
Next rwIndex
Thanks in advance.
David