+ Reply to Thread
Results 1 to 8 of 8

Compare one value to visible column values

  1. #1
    Registered User
    Join Date
    12-02-2013
    Location
    sao paulo
    MS-Off Ver
    Excel 2010
    Posts
    2

    Compare one value to visible column values

    Is it possible to compare one value to an entire column, considering only the visible cells?

    I need to compare if one column is using a specific filter criteria.


    Thanks.

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Compare one value to visible column values

    You can use the specialcells method to return visible cells. So for example, to count how many times, "the" exists in column A considering visible cells:
    worksheetfunction.countif(Columns(1).specialcells(xlcelltypevisible),"=the")

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Compare one value to visible column values

    Hi and welcome to the forum

    If you want VBA, then hopefully yudlugar's suggestion will work for you

    You could probably do this with a regular formula though, using subtotal()

    =SUBTOTAL(3,A2:A6) will count all the values, even hidden rows
    =SUBTOTAL(103,A2:A6) will only count values in non-hidden rows
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Compare one value to visible column values

    @ FDibbins - I had a look at that but couldn't work out a way to get it to do a countif type function - is there a way to do that where you can compare a specific value?

  5. #5
    Registered User
    Join Date
    12-09-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Compare one value to visible column values

    Hi

    I am trying to resolve a similar problem - can I filter on one column and then count the words "Not applicable" in another column for non-hidden cells only?

    Thanks

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Compare one value to visible column values

    Hi jogg and welcome to the forum

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

  7. #7
    Registered User
    Join Date
    12-09-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Compare one value to visible column values

    Thanks for this advice, but I can't find what I click to create a new question - how do I do this?

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Compare one value to visible column values

    Close to the very top of this thread, click the button called FORUM, then pick a forum and the Post New Thread

    Thanks

+ 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. Count unique, visible values in a filtered column
    By kajakk in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-07-2013, 08:42 AM
  2. [SOLVED] Compare 4 column values then insert a 5th columns value to a blank column/cell value
    By JasonKMcCoy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-27-2012, 06:01 PM
  3. How to Compare Column 12 to values in column 6 while deleting dups from column 12
    By Launchnet in forum Excel Programming / VBA / Macros
    Replies: 33
    Last Post: 12-16-2011, 03:21 AM
  4. Replies: 0
    Last Post: 07-27-2010, 03:08 PM
  5. Copy only visible values in column
    By rushdenx1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-15-2007, 06:05 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