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


Hello

I want to detect the number of the row that shows the last data after
after filtering a table. Let me explain, I have a table with autofilter
on, and after filtering one column using any criterion, i want to know
the Row number of the last data remaining. I hope it's clear enough to
you in order to suggest me some ideas.

Thanks in advance

Regards

Jose Luis


--
jose luis
------------------------------------------------------------------------
jose luis's Profile: http://www.excelforum.com/member.php...o&userid=13312
View this thread: http://www.excelforum.com/showthread...hreadid=567301

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default Detecting Row number

Off the top of my head there are 2 ways.
1. if there is nothing beneath your autofiltered data
LastVisibleRow = Range("A" & Rows.Count).End(xlUp).Row

2. If there is something beneath autofilter and Column "A" or any other
Column that you specify has data in every row, down to the last row.
LastVisibleRow = Range("A1").End(xlDown).Row

HTH

Die_Another_Day

jose luis wrote:
Hello

I want to detect the number of the row that shows the last data after
after filtering a table. Let me explain, I have a table with autofilter
on, and after filtering one column using any criterion, i want to know
the Row number of the last data remaining. I hope it's clear enough to
you in order to suggest me some ideas.

Thanks in advance

Regards

Jose Luis


--
jose luis
------------------------------------------------------------------------
jose luis's Profile: http://www.excelforum.com/member.php...o&userid=13312
View this thread: http://www.excelforum.com/showthread...hreadid=567301


  #3   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Detecting Row number

A little longer, but seemed to work. Worksheet reference would have to be
changed.

Sub test()
With Worksheets("Sheet2")
With Intersect(.AutoFilter.Range, _
.Cells.SpecialCells(xlCellTypeVisible))
With .Areas(.Areas.Count)
MsgBox .Rows(.Rows.Count).Row
End With
End With
End With
End Sub


"jose luis" wrote:


Hello

I want to detect the number of the row that shows the last data after
after filtering a table. Let me explain, I have a table with autofilter
on, and after filtering one column using any criterion, i want to know
the Row number of the last data remaining. I hope it's clear enough to
you in order to suggest me some ideas.

Thanks in advance

Regards

Jose Luis


--
jose luis
------------------------------------------------------------------------
jose luis's Profile: http://www.excelforum.com/member.php...o&userid=13312
View this thread: http://www.excelforum.com/showthread...hreadid=567301


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Detecting Row number


Thanks a lot "H", worked just fine.

Regards

Jose Luis


--
jose luis
------------------------------------------------------------------------
jose luis's Profile: http://www.excelforum.com/member.php...o&userid=13312
View this thread: http://www.excelforum.com/showthread...hreadid=567301

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
detecting a tab delimiter PLPE[_19_] Excel Programming 2 July 19th 05 06:29 PM
Detecting absentees gracegift Excel Discussion (Misc queries) 7 December 27th 04 11:35 PM
Detecting Row Deletion Doug Glancy Excel Programming 0 July 6th 04 06:56 PM
Detecting Row Deletion GaryZ Excel Programming 0 July 6th 04 06:33 PM
Detecting Excel 97 using VBA Casper Hornstrup[_2_] Excel Programming 4 June 24th 04 04:28 AM


All times are GMT +1. The time now is 06:51 PM.

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"