Perhaps the OP solved the problem? Irrespective, I am also having problems
understand the logic of the request.
My interpretation of the question
1) If A is blank add B to A and store in A. {my comment - delete Column B
value?}
2) If there is a number in A, add it to column B. {my comment - this seems
reverse logic of the above BUT, the OP may have a good reason for doing it
this way and clearly seems to indicate copy rather than add}
Code to do this:
Sub AddBtoAorAtoB()
Dim rws As Long
rws = ActiveSheet.UsedRange.Rows.Count
For i = 1 To rws
If ActiveSheet.Range("A" & i) > 0 Then
If ActiveSheet.Range("B" & i) & "" = "" Then
ActiveSheet.Range("B" & i) = ActiveSheet.Range("A" & i)
Else
ActiveSheet.Range("A" & i) = ActiveSheet.Range("B" &
i).Value + ActiveSheet.Range("A" & i)
End If
Else
ActiveSheet.Range("A" & i) = ActiveSheet.Range("B" & i).Value
End If
Next i
End Sub
If the OP just wants to add the value in column B to the value in column A,
whether either of the values is blank is irrelevant:
Sub SimplyAddBtoA()
Dim rws As Long
rws = ActiveSheet.UsedRange.Rows.Count
For i = 1 To rws
ActiveSheet.Range("A" & i) = ActiveSheet.Range("B" & i).Value +
ActiveSheet.Range("A" & i)
'uncomment below to prevent 0 values
'If ActiveSheet.Range("A" & i) = 0 Then ActiveSheet.Range("A" & i) =
""
'to prevent repeated adding of column B values
' clean up as you go
ActiveSheet.Range("B" & i).Value = ""
Next i
End Sub
The ball is in pcor's court. If both the above missed the specification,
pcor may help by supplying sample data (this is how it looks like now, this
is how it should look after the code runs) .