+ Reply to Thread
Results 1 to 11 of 11

Formula to Identify Highlighted Cells

  1. #1
    Registered User
    Join Date
    02-09-2022
    Location
    Baltimore, MD
    MS-Off Ver
    Office 365
    Posts
    19

    Formula to Identify Highlighted Cells

    I have spreadsheet where I will be manually highlighting specific cells. I would like to be able to count the cells that are highlighted. Attached is a sample worksheet, where I want to return the count of highlighted cells on the sheet in E2. My actual spreadsheet is much larger which is why I would need a formula or function that can do this for me. I did some research online and it seems most solutions require the use of VBA, which I don't have experience with. Is there another way to do this?
    Attached Files Attached Files
    Last edited by s10; 03-22-2024 at 09:59 AM. Reason: solved

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Formula to Identify Highlighted Cells

    Nothing without VBA. That said, you could AutoFilter the red cells and use
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    02-09-2022
    Location
    Baltimore, MD
    MS-Off Ver
    Office 365
    Posts
    19

    Re: Formula to Identify Highlighted Cells

    That won't work because it's not a specific column or row, I would need it to be able to check the whole entire sheet, without filtering anything. In that case, is there a simple way I can do it in VBA?

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Formula to Identify Highlighted Cells


  5. #5
    Registered User
    Join Date
    02-09-2022
    Location
    Baltimore, MD
    MS-Off Ver
    Office 365
    Posts
    19

    Re: Formula to Identify Highlighted Cells

    Thank you! That link was very helpful. It's seems the easiest solution is to use the find and select command, but this will need to be done manually. The other option that looks promising is using VBA to Count Colored Cells. Is this the correct place for me to enter the code they provide?

    Screenshot 2024-03-22 093147.png

    I'm somewhat familiar with VBA, but could definitely use guidance if anyone can help.
    Attached Files Attached Files

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Formula to Identify Highlighted Cells

    No, you should put it in a Standard module, not a Sheet module.

  7. #7
    Registered User
    Join Date
    02-09-2022
    Location
    Baltimore, MD
    MS-Off Ver
    Office 365
    Posts
    19

    Re: Formula to Identify Highlighted Cells

    Like so?
    standard module.png

    Then how do I get it to run? I'm really a beginner at this so I would appreciate if you could walk me through it.
    Last edited by s10; 03-22-2024 at 09:49 AM.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Formula to Identify Highlighted Cells

    Yep, like that. In a cell in a worksheet, use =COLORCOUNT(B2:F20, A1), for example.

    The range (B2:F20) is the range you want to count. The cell (A1) is the cell whose colour you want to count.
    Last edited by TMS; 03-22-2024 at 09:52 AM.

  9. #9
    Registered User
    Join Date
    02-09-2022
    Location
    Baltimore, MD
    MS-Off Ver
    Office 365
    Posts
    19

    Re: Formula to Identify Highlighted Cells

    How and where do I identify the fill color I would like to be counting?

  10. #10
    Registered User
    Join Date
    02-09-2022
    Location
    Baltimore, MD
    MS-Off Ver
    Office 365
    Posts
    19

    Re: Formula to Identify Highlighted Cells

    Did I do it correctly here?

    sample worksheet.xlsm

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Formula to Identify Highlighted Cells

    I can't test it as I’m using an iPad but, yes, that looks perfect.


    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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] getting list of highlighted cells based on the last highlighted cell in the same row
    By Omran Y in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-18-2024, 09:50 AM
  2. [SOLVED] VBA to identify files has No highlighted in Green in particular column
    By Philipluis30 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-09-2022, 11:21 PM
  3. VBA: How to identify DIFFERENT grey highlighted cells?
    By Apple1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-12-2021, 05:52 PM
  4. [SOLVED] UNSOLVED - Identify highlighted cells in column, copy cell value to column B of active row
    By Armitage2k in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-16-2014, 04:42 AM
  5. Identify highlighted cells and mark with an "x"
    By nkimball in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-01-2014, 10:19 AM
  6. Replies: 7
    Last Post: 06-13-2013, 06:56 AM
  7. Replies: 0
    Last Post: 02-03-2012, 07:26 PM

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