Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default How to capture row number

I am using Excel 2002. I need to capture the row number and then skip to
the next row and then capure that row number. Basically I have set a filter
on a column and then go to row 1. The next row may be 37 or 263 or
something like that. I need to skip to the next row and capture that
number.

How do I do that?

TIA
Glen


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default How to capture row number

Glen.

Activecell.Row

will return the row number of the active cell.
You could pass that value to a memory variable for later use.

I'm thinking that maybe you have a filtered list?
If that's the case, you'll probably need to select the next
Visible row in a range?? That's a whole different story.

Try this code if it is a filtered list:

Dim nVisRow as Long
With ActiveCell
nVisRow = Range(.Offset(1), Cells(65536, .Column)) _
.SpecialCells(xlCellTypeVisible).Cells(1).Row
End With
Range("A" & nVisRow).Select

Post back with some more info if the above doesn't help..

John

"Glen Mettler" wrote in message
...
I am using Excel 2002. I need to capture the row number and then skip to
the next row and then capure that row number. Basically I have set a

filter
on a column and then go to row 1. The next row may be 37 or 263 or
something like that. I need to skip to the next row and capture that
number.

How do I do that?

TIA
Glen




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default How to capture row number

John,
I do have a filtered list. This works like a champ!!
Thanks
Glen


"John Wilson" wrote in message
...
Glen.

Activecell.Row

will return the row number of the active cell.
You could pass that value to a memory variable for later use.

I'm thinking that maybe you have a filtered list?
If that's the case, you'll probably need to select the next
Visible row in a range?? That's a whole different story.

Try this code if it is a filtered list:

Dim nVisRow as Long
With ActiveCell
nVisRow = Range(.Offset(1), Cells(65536, .Column)) _
.SpecialCells(xlCellTypeVisible).Cells(1).Row
End With
Range("A" & nVisRow).Select

Post back with some more info if the above doesn't help..

John

"Glen Mettler" wrote in message
...
I am using Excel 2002. I need to capture the row number and then skip

to
the next row and then capure that row number. Basically I have set a

filter
on a column and then go to row 1. The next row may be 37 or 263 or
something like that. I need to skip to the next row and capture that
number.

How do I do that?

TIA
Glen






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default How to capture row number

Glen,

Glad it worked.
Happy to have been a help.

John

"Glen Mettler" wrote in message
...
John,
I do have a filtered list. This works like a champ!!
Thanks
Glen


"John Wilson" wrote in message
...
Glen.

Activecell.Row

will return the row number of the active cell.
You could pass that value to a memory variable for later use.

I'm thinking that maybe you have a filtered list?
If that's the case, you'll probably need to select the next
Visible row in a range?? That's a whole different story.

Try this code if it is a filtered list:

Dim nVisRow as Long
With ActiveCell
nVisRow = Range(.Offset(1), Cells(65536, .Column)) _
.SpecialCells(xlCellTypeVisible).Cells(1).Row
End With
Range("A" & nVisRow).Select

Post back with some more info if the above doesn't help..

John

"Glen Mettler" wrote in message
...
I am using Excel 2002. I need to capture the row number and then skip

to
the next row and then capure that row number. Basically I have set a

filter
on a column and then go to row 1. The next row may be 37 or 263 or
something like that. I need to skip to the next row and capture that
number.

How do I do that?

TIA
Glen








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 screen capture to capture cells and row and column headings jayray Excel Discussion (Misc queries) 5 November 2nd 07 11:01 PM
want to capture date elegantpartner Excel Discussion (Misc queries) 1 January 9th 06 04:20 AM
Capture the Workbook Name Minitman Excel Worksheet Functions 12 December 7th 05 04:50 PM
Median of Even Set; How to Capture them? Mike Excel Discussion (Misc queries) 7 July 28th 05 01:24 PM
Time Capture... billQ Excel Programming 1 November 18th 03 10:14 PM


All times are GMT +1. The time now is 10:04 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"