View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default Referring to cells in a filtered range

Thanks Leith,

This is a good idea, especially if one often have to re-access the filtered
cells.
But I hold the view that Excel should supply this information itself without
additional coding!

Regards,
Stefi

€˛Leith Ross€¯ ezt Ć*rta:


Hello Stefi,

AS the For Each loop finds the visible cells, store the information in
an Array. You can then reference the array later to retrieve the value,
address, etc. for the cell you want.


Code:
--------------------

Dim SpCells()
Dim cell
Dim n As Long

For Each cell In filteredrng
Redim Preserve SpCells(1, n)
SpCells(0, n) = cell.Row
SpCells(1, n) = cell.Value
n = n + 1
Next cell

--------------------


Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=479715


 
ExcelBanter Database Error
Database Error Database error
The ExcelBanter database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.excelbanter.com home page, then try to open another page.
  • Click the Back button to try another link.
The www.excelbanter.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.