+ Reply to Thread
Results 1 to 4 of 4

SpecialCells in UDF - what have I missed?

  1. #1
    Forum Contributor
    Join Date
    10-25-2011
    Location
    Preston, England
    MS-Off Ver
    Excel 2016
    Posts
    136

    SpecialCells in UDF - what have I missed?

    I found some UDF code for counting cells in a range based on their background color. I want to tweak it to ignore hidden cells but .SpecialCells(xlCellTypeVisible) isn't working. What have I missed here? Many thanks

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: SpecialCells in UDF - what have I missed?

    How isn't SpecialCells working?

    If it isn't working could you not check for the visibility of the individual cells?
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: SpecialCells in UDF - what have I missed?

    Hi,

    Specialcells is one of the methods that doesn't work in UDFs.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  4. #4
    Forum Contributor
    Join Date
    10-25-2011
    Location
    Preston, England
    MS-Off Ver
    Excel 2016
    Posts
    136

    Re: SpecialCells in UDF - what have I missed?

    Quote Originally Posted by Norie View Post
    How isn't SpecialCells working?

    If it isn't working could you not check for the visibility of the individual cells?
    Please Login or Register  to view this content.
    The count is counting all cells in the range whether they are hidden or not. I know they are hidden as I have manually hidden the columns> select column > right click > hide

    Thanks xlnitwit, as I expected. Nevermind I'll find a different way.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Add ins tab is missed on the ribbon
    By theprincesunil in forum Excel General
    Replies: 9
    Last Post: 12-02-2016, 12:50 PM
  2. Get the number of missed payments and missed payments of interest
    By chergian in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-01-2016, 08:37 PM
  3. Something I missed or need to exclude?
    By jdenglere in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-25-2012, 08:32 AM
  4. Add-In tab missed on the tool bar
    By theprincesunil in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-25-2012, 02:38 PM
  5. Array being missed....
    By Slyone2 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-12-2010, 05:24 PM
  6. replacing missed value
    By Miloud in forum Excel General
    Replies: 4
    Last Post: 12-29-2008, 02:47 AM
  7. missed data
    By rjl in forum Excel General
    Replies: 2
    Last Post: 01-10-2006, 09:37 AM

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