I have a database with a set of numbers from 1~100. I would like VBA to run through this list in column A and, on areas where A is between 20 and 40, type McFly on column B.
The code I have gives me a mismatch error 13 on the line that starts with "If list >="
Dim list As Range
Dim list_readthru As Range
Set list = Range("A2", Range("A50").End(xlUp))
For Each list_readthru In list
If list >= 20 And list <=40 Then Range("B:B") = "McFly"
Next list_readthru
End Sub
I am having problems identifying what I am doing wrong.
list.valuebutrange("B:B")needs more work...