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: 1,090
Default Counting visible cells

Excel XP, Win XP
Helping an OP.
I have a range with numerous hidden columns.
The hidden columns are not contiguous.
Columns A:B are always visible.
I want to count the number of visible columns.
Row 4 is the header row, so I want to count the number of visible cells in
Row 4.
I use the following code to give me that count. I get an error on this
line.
The error message is "Unable to get the SpecialCells property of the range
class."
ColCount = Range("A4", Cells(4, Columns.Count).End(xlToLeft)) _
.SpecialCells(xlCellTypeVisible).Count
This seems simple to do. What am I doing wrong? Thanks for your time.
Otto


 
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
Copy Visible Cells in Sheet with Merged and Hidden Cells rtwiss Excel Discussion (Misc queries) 5 April 25th 23 09:08 AM
Visible Cells Only Chris from Chicago Excel Worksheet Functions 0 November 4th 08 06:57 PM
Sum only visible cells Charlie Excel Programming 5 December 16th 05 04:33 PM
Counting visible cells Otto Moehrbach[_5_] Excel Programming 1 September 18th 03 03:01 PM
Help: Copying Visible Cells only to Visible cells! Jay Jayakumar Excel Programming 0 July 9th 03 08:25 PM


All times are GMT +1. The time now is 07:30 AM.

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"