Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 31st, 2009, 12:09 AM
Authorized User
Points: 125, Level: 2
Points: 125, Level: 2 Points: 125, Level: 2 Points: 125, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2009
Posts: 23
Thanks: 1
Thanked 0 Times in 0 Posts
Default Cell addresses

Greetings

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

A B C
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.

Objective
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.

Thanks.
 
Old July 31st, 2009, 01:55 AM
Friend of Wrox
Points: 3,060, Level: 23
Points: 3,060, Level: 23 Points: 3,060, Level: 23 Points: 3,060, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2005
Location: , , .
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Hi

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

Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)




Similar Threads
Thread Thread Starter Forum Replies Last Post
Validate multiple email addresses mat41 Javascript 1 August 29th, 2007 12:45 AM
How to get contact addresses from websites(yahoo) suryasimha ASP.NET 1.0 and 1.1 Professional 4 October 3rd, 2006 01:08 AM
Validate multiple email addresses... mat41 Javascript 5 March 16th, 2006 12:17 AM
SQL query for email addresses clearsky SQL Language 1 October 7th, 2005 10:15 PM
Network printer addresses interrupt Javascript How-To 6 September 2nd, 2004 10:37 AM





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