LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default SpecialCells

I am trying to access the next cell in a Range of SpecialCells of xlVisible
type only. For some reason when I use
Dim r as Range, rng1 as range
set rng1 = colums(3).SpecialCells(xlVisible)
For each r in rng1
blah,blah
Next
It goes through the visible cells. BUT when I replace the For Each loop with

rng1.Cells(2,1).Value
rng1.Cells(3,1).Value

where cells(3,1,) in the normal worksheet is hidden, it will return the
hidden cell(the hidden cell right after the non-hidden cell cells(2,1)
instead of returning the next visible cell in the rng1 object.
Any ideas? I want to compare the contents of two visible cells to see if
they are duplicates, and delete the second cell and the hidden cells after
the duplicate.
 
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
SpecialCells Peter Excel Programming 3 April 12th 06 02:03 PM
SpecialCells & AddressLocal [email protected] Excel Programming 4 March 30th 06 04:03 PM
Specialcells Bruno Uato Charts and Charting in Excel 0 October 7th 05 07:42 PM
SpecialCells(xlCellTypeLastCell) Tom Ogilvy Excel Programming 0 July 21st 04 03:37 PM
SpecialCells(xlCellTypeFormulas) Kevin Gabbert Excel Programming 1 January 28th 04 05:06 PM


All times are GMT +1. The time now is 11:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"