+ Reply to Thread
Results 1 to 2 of 2

Number of Cells in a Selection (range)

Hybrid View

  1. #1
    Registered User
    Join Date
    02-22-2007
    Posts
    47

    Thumbs up Number of Cells in a Selection (range)

    Hi all,

    I would like to identify if there is more than one Cell in a Selected range before doing my procedure.

    Do you know how to determine if there is more than one Cell in a Selected Range?

    Thanks!

        For Each myCell In Selection
                CountCell = CountCell + 1
            Next myCell
            
            If CountCell > 1 Then
                Selection.SpecialCells(xlCellTypeVisible).Select
            End If
    Last edited by kyrgyzstanart; 06-21-2010 at 11:09 AM.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: Number of Cells in a Selection (range)

    Good afternoon kyrgyzstanart

    I know you've marked your selection as solved as you've found a solution, but there is an alternative to looping through the cells :
    CountCell = Selection.Count
    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1