#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default myCell.Row?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default myCell.Row?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default myCell.Row?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default myCell.Row?

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
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
ListBox1. add item myCell.entirerow Vikram Dhemare Excel Discussion (Misc queries) 3 April 8th 08 01:49 AM
Custom Data Validation : Lock if MyCell = ""? RayportingMonkey Excel Worksheet Functions 5 October 25th 07 03:14 PM
myCell.Formula application unknown object error orangie Excel Programming 4 March 21st 07 10:17 PM
Problem with leap-frogging myCell Range Dennis Excel Programming 0 December 11th 06 11:36 PM
Value of next visible mycell within a rng Rasmus[_3_] Excel Programming 8 April 16th 05 01:03 AM


All times are GMT +1. The time now is 05:33 PM.

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

About Us

"It's about Microsoft Excel"