p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Excel VBA (http://p2p.wrox.com/forumdisplay.php?f=79)
-   -   Cell addresses (http://p2p.wrox.com/showthread.php?t=75483)

SMI// July 31st, 2009 12:09 AM

Cell addresses

Here is an example of my data with A,B,C etc as columns and left most values as row numbers:

212 Mike Driver 12-Jun-04
227 Nicholas Driver 19-Nov-08
436 David Driver 14-Apr-05

This is an extract of a data of 12000 or more rows few more columns. For example purpose only 3 columns have been taken. Suppose I used an AutoFilter with driver as the criteria and above is a filtered list of exployees with this designation.

I want to know cell addresses of each of the above cells even though filter has been applied to the sheet. Is there a way?

I tried to do this using range("a1").End(xlDown).Address but that only takes me to row number 436 which is the last row in the filtered data. And then if I use Activecell.End(xlup).Address, it takes me to cell A1 instead of cell A227.

I hope it all makes sense what I am trying to get here.


Shasur July 31st, 2009 01:55 AM


You can use the visible cells (specialcells property) to get the group of cells

I have tried the same to get the first cell (http://vbadud.blogspot.com/2008/08/r...-of-excel.html) of the Filtered Set. However, you can tweak it to get the range

Please let me know if you need any help on this


All times are GMT -4. The time now is 06:09 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.