Adding a WHERE statement
Never have come across a Where statement. You might be able to use an If
statement or a While statement.
exmpl: For Each cell In Range("B2:B500")
If cell < 2 Or cell = "" Then
'Do Something or Not
End If
Next
or exmpl2: While Range("B2:B500") < 2 Or Range("B2:B500") = ""
'Do Something or Not
Wend
If you would explain what you want to accomplish, somebody will probably be
able to help you.
"NEWER USER" wrote:
I recorded a basic macro and want to add a WHERE statement in the body and
need some help. I recorded
Range("B2").Select
ActiveCell.FormulaR1C1 = "1"
Range("B2").Select
Selection.Copy
Range("B2:B65536").Select
Application.CutCopyMode = False
Selection.FillDown
Range("A2").Select
I want to fill Column B entirely WHERE any value LESS THAN 2 OR NULL. Any
Help appreciated as to where and How to add statement.
|