Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Simple Question (for you wizards...) please help

Thank you!!!.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 Wizards? MJP08 New Users to Excel 3 July 25th 08 12:24 AM
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
This'll be one for the wizards mr tom Excel Worksheet Functions 7 May 2nd 07 02:39 PM
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
simple question, hopefully a simple answer! Matt B Excel Programming 5 January 13th 04 08:43 PM


All times are GMT +1. The time now is 02:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"