Simple Question (for you wizards...) please help
Your Range("a" & i) cycles through the A column. To cycle through the first
row use:
Cells(1, i). The "i" is then the column number and the "1" is the row
number. HTH Otto
"Alex" wrote in message
oups.com...
Hello,
with this simple code I cycle on the "A" column (a1,a2,a3 etc.)and I
see if its contents is <= or 10.
-------------
Sub macro()
For i = 1 To 65536
SelezioneCella = Range("a" & i)
Range("b" & i).Select
Select Case SelezioneCella
Case Is <= 10
ActiveCell.FormulaR1C1 = "minore o uguale a 10"
Case Is 10
ActiveCell.FormulaR1C1 = "maggiore di 10"
Case Else
ActiveCell.FormulaR1C1 = "non era un numero"
End Select
Next i
-------------
Now my problem is that I'd like to cycle on the first row, I mean
(a1,b1,c1 etc.).
How can I do that?.
Thanks.
Alex.
|