Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple Question (for you wizards...) please help
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple Question (for you wizards...) please help
Thank you!!!.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 Wizards? | New Users to Excel | |||
IF formula-simple question; simple operator | Excel Discussion (Misc queries) | |||
This'll be one for the wizards | Excel Worksheet Functions | |||
Simple Simple Excel usage question | Excel Discussion (Misc queries) | |||
simple question, hopefully a simple answer! | Excel Programming |