+ Reply to Thread
Results 1 to 5 of 5

Conditional formatting of visible cells Excel 2010

  1. #1
    Registered User
    Join Date
    05-11-2017
    Location
    wyoming
    MS-Off Ver
    10
    Posts
    2

    Conditional formatting of visible cells Excel 2010

    I need to Highlight cells in a column that I'm looking for duplicates in. I only want to look for duplicates in visible cells after a filter is applied. Conditional formatting now looks for duplicates in the visible and non visible cells which is giving me false positives.

    Thanks

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Conditional formatting of visible cells Excel 2010

    as a way with user difined function
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by tim201110; 05-11-2017 at 02:20 PM.

  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
    53,048

    Re: Conditional formatting of visible cells Excel 2010

    Tim Sorry for off-topic interjection:

    Although there is no official rule regarding this behavior, we request that wherever possible both the question AND the answer be provided in substantive detail here within the thread. An attached workbook is an excellent aid for posing a question and offering a solution, but solely doing that with no in thread explanation makes it difficult for researchers to understand or consider the Q & A of this thread without downloading what may be a pointless doc to them, if they can do that at all. Doing that also hides the content from search engines so others may never benefit from this.

    I'm sure you understand, and we look forward to seeing you post your formulas/macros in your posts for the searching benefit of all.

    Thanks again for all your hard work here!
    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
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Conditional formatting of visible cells Excel 2010

    cmikec, welcome to the forum.

    An alternative, if this is only going to be done occasionally and/or you don't want to use VBA, is as follows:

    First, add 'Select visible cells' to your Quick Access Toolbar (QAT):
    • Click the down arrow at the end of the QAT and select 'More Commands'
    • Under 'Choose Commands from' select either 'All Commands' or 'Commands not in the ribbon'
    • Scroll down to find 'Select Visible Cells'
    • Click 'Add' then 'OK'

    Now, clear the 'duplicates' conditional formatting (CF) from your column.
    Select your column as normal, then click the 'Select Visible Cells' button.
    Now do your CF to highlight duplicates again. This time it'll only be applied to the visible cells.

    I hope that's useful.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Conditional formatting of visible cells Excel 2010

    Another approach would be the little used and mostly forgotten old Excel4 Get.Cell 'macro/function'.

    One of the parameters that the Get.Cell can return is the row height, something which appears to have been overlooked with the CELL() function which will return a cell width but not the row height. If we know that the row height is zero then that allows us to use work out the duplicates you want to highlight.

    Create a name called say CountVisible and define it as
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Now in a helper column alongside your data enter the formula =CountVisible and copy it down.

    The attached example consists of column A which allows you to pick a subset of data to demonstrate the process, column B which contains the values you want to check and the helper column C

    Then create a conditional format in B2 and apply it to the whole range

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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. Mail only visible cells with conditional formatting
    By Protonspounge in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-09-2017, 11:14 AM
  2. Replies: 1
    Last Post: 12-08-2016, 03:14 PM
  3. Use conditional formatting only on visible not hidden cells
    By JackBauer in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-24-2014, 08:26 AM
  4. Paste to visible cells only (Excel 2010)
    By dihris in forum Excel General
    Replies: 8
    Last Post: 11-15-2013, 03:48 AM
  5. [SOLVED] Excel 2010 - conditional formatting - blank cells
    By Phil81503 in forum Excel General
    Replies: 5
    Last Post: 07-01-2013, 02:56 PM
  6. [SOLVED] Excel 2010 Conditional Formatting to Highlight input cells based on Dates
    By chrisb84 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-20-2013, 09:39 AM
  7. [SOLVED] Conditional Formatting of Cells in Excel 2010
    By LadyScot101 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-06-2012, 04:38 PM

Tags for this Thread

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