Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I was expecting myCell.Row to return the current Row number as an integer
when I loop through a series of rows in a Range. It appears to think that "1" is all I will ever need to know <g! What is the correct way to ask for the current Row number? -- Dave Temping with Staffmark in Rock Hill, SC |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Dave,
To get the row number of the current active cell, ActiveCell.Row If myCell is a range variable that you use to loop through each cell in a certain range, then myCell.Row should work.. For example: Dim myCell as Range For each myCell in Range("A1:A10") Debug.Print myCell.Row Next myCell -- Hope that helps. Vergel Adriano "Dave Birley" wrote: I was expecting myCell.Row to return the current Row number as an integer when I loop through a series of rows in a Range. It appears to think that "1" is all I will ever need to know <g! What is the correct way to ask for the current Row number? -- Dave Temping with Staffmark in Rock Hill, SC |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Dave
I not see your loop code but you can use this Dim cell As Range For Each cell In Range("A1:A10") MsgBox cell.Row Next cell -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Dave Birley" wrote in message ... I was expecting myCell.Row to return the current Row number as an integer when I loop through a series of rows in a Range. It appears to think that "1" is all I will ever need to know <g! What is the correct way to ask for the current Row number? -- Dave Temping with Staffmark in Rock Hill, SC |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That gave me the clue I was looking for. Don't have it all working yet, but
knowing what to call it, hacking is now an option <g! Thanks a million. -- Dave Temping with Staffmark in Rock Hill, SC "Vergel Adriano" wrote: Hi Dave, To get the row number of the current active cell, ActiveCell.Row If myCell is a range variable that you use to loop through each cell in a certain range, then myCell.Row should work.. For example: Dim myCell as Range For each myCell in Range("A1:A10") Debug.Print myCell.Row Next myCell -- Hope that helps. Vergel Adriano "Dave Birley" wrote: I was expecting myCell.Row to return the current Row number as an integer when I loop through a series of rows in a Range. It appears to think that "1" is all I will ever need to know <g! What is the correct way to ask for the current Row number? -- Dave Temping with Staffmark in Rock Hill, SC |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ListBox1. add item myCell.entirerow | Excel Discussion (Misc queries) | |||
Custom Data Validation : Lock if MyCell = ""? | Excel Worksheet Functions | |||
myCell.Formula application unknown object error | Excel Programming | |||
Problem with leap-frogging myCell Range | Excel Programming | |||
Value of next visible mycell within a rng | Excel Programming |