Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.scripting.vbscript > #11179

SpecialCells(xlCellTypeVisible)

Newsgroups microsoft.public.scripting.vbscript
Date 2015-11-07 12:42 -0800
Message-ID <fee3e422-c392-4249-8df6-3df79c0c00e5@googlegroups.com> (permalink)
Subject SpecialCells(xlCellTypeVisible)
From Ty <tyrone_bak@yahoo.com>

Show all headers | View raw


Attempt to use "For Each TCell In CountRange.SpecialCells(xlCellTypeVisible)" for my excel problem.  It is not working.

Problem:  Only want to count colored cells that are filtered. Do not want count the hidden rows/cells.

Do anyone have an answer to my problem?

Function CountByColor(ICol as integer, CountRange As Range)

Application.Volatile

Dim TCell As Range

For Each TCell In CountRange.SpecialCells(xlCellTypeVisible)
    If ICol = TCell.value Then
        CountByColor = CountByColor + 1
    End If
Next TCell
End Function

Thanks,
Ty

Back to microsoft.public.scripting.vbscript | Previous | NextNext in thread | Find similar


Thread

SpecialCells(xlCellTypeVisible) Ty <tyrone_bak@yahoo.com> - 2015-11-07 12:42 -0800
  Re: SpecialCells(xlCellTypeVisible) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-11-07 22:26 +0100

csiph-web