Please help me to solve this. Once I run this VBA macro it shows an error mentioning the Application-defined or object define error.
Code:
Sub income_status()
Dim i As Integer
For i = 1 To 10
Cells(i, 0) = ActiveCell.Value
If Cells(i, 0) <= 10000 Then
Cells(i, 1) = "Low Income"
ElseIf Cells(i, 0) > 10000 And Cells(i, 0) <= 50000 Then
Cells(i, 1) = "Medium Income"
Else
Cells(i, 1) = "High Income"
End If
Next i
End Sub
, 0and, 1to, 1and, 2respectively, is just taking the one (active) cell and placing that same value into 10 rows with the same corresponding description placed into the column next to it. Are you instead trying to process the 10 different values in the 10 rows starting from the current cell? - YowE3K