Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
detecting a tab delimiter | Excel Programming | |||
Detecting absentees | Excel Discussion (Misc queries) | |||
Detecting Row Deletion | Excel Programming | |||
Detecting Row Deletion | Excel Programming | |||
Detecting Excel 97 using VBA | Excel Programming |