+ Reply to Thread
Results 1 to 9 of 9

Highlight all cells that have the same value just by clicking in one of the cells

  1. #1
    Registered User
    Join Date
    01-15-2016
    Location
    Golden, Colorado
    MS-Off Ver
    2013
    Posts
    5

    Question Highlight all cells that have the same value just by clicking in one of the cells

    Howdy All,

    Bottom line up front: I'd like to be able to click on any of the cells in my spreadsheet that contain the word "Fuel" and have all cells
    on the spreadsheet that contain the word "Fuel" to become highlighted. When I click on a cell that contains the word "Groceries"
    I'd like all cells with the word "Groceries" in it to become highlighted. etc. . .


    I did a search before posting and could not find anything relevant.

    I am a casual Excel 2013 user and basically a neophyte, so please bear with me.

    I have a spreadsheet that I use to record my expenses. I've got a range of expense categories defined.

    When I add a new expense, I enter the expense category into a cell and the expense value in an adjacent cell.

    Over the course of a month, I might have 10 entries for "Fuel".

    I want to be able to "At a glance" see all my "Fuel" expenditures.

    Thanks in advance.

    Dan K.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Highlight all cells that have the same value just by clicking in one of the cells

    Check out Conditional Formatting or post a sample file.
    Post a sample file in excel format rather than an image.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    01-15-2016
    Location
    Golden, Colorado
    MS-Off Ver
    2013
    Posts
    5

    Re: Highlight all cells that have the same value just by clicking in one of the cells

    I've used conditional formatting in the spreadsheet to highlight certain things, but (Again I am a neophyte) in my example above, I only want the matching cells to highlight when I've got one of those cells selected. I've attached a test copy of the spreadsheet.

    Cheers,

    Dan K.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-15-2016
    Location
    Golden, Colorado
    MS-Off Ver
    2013
    Posts
    5

    Re: Highlight all cells that have the same value just by clicking in one of the cells

    Oh well. . .

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Highlight all cells that have the same value just by clicking in one of the cells

    I wiped out the conditional formatting that you had on the first two worksheets so that it wouldn't be confusing as to what rules were made.
    On the January worksheet:
    I used A1 as the key. If you want to just click on a cell, you will need to use VBA.
    I selected =$A$4:$H$33 then used Conditional Formatting, Highlight Cells Equal to.

    On the second worksheet, I selected an area and used this formula
    =A4=$A$1
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  6. #6
    Registered User
    Join Date
    01-15-2016
    Location
    Golden, Colorado
    MS-Off Ver
    2013
    Posts
    5

    Re: Highlight all cells that have the same value just by clicking in one of the cells

    Thanks for that effort. I see what you did.

    I really don't want to become an Excel guru or VBA programmer,
    so I guess I'll just live with not being able to do what I
    hoped.

    Cheers,

    Dan K.

  7. #7
    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,425

    Re: Highlight all cells that have the same value just by clicking in one of the cells

    Copy this code into the Workbook Class Module.

    (Press Alt-F11 to open the VBE; double click on the Workbook object in the left hand pane; copy the code into the right hand pane; save the workbook as Macro Enabled)

    Please Login or Register  to view this content.

    Regards, TMS
    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


  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,425

    Re: Highlight all cells that have the same value just by clicking in one of the cells

    Please see the updated sample workbook.

    Regards, TMS
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    01-15-2016
    Location
    Golden, Colorado
    MS-Off Ver
    2013
    Posts
    5

    Re: Highlight all cells that have the same value just by clicking in one of the cells

    TMS,

    Thank you very much for your time and effort. This is exactly what I want to do.

    Cheers,

    Dan K.

+ 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. Nested Loop inside pivot to highlight Cells, But Cells don't stay highlighted!
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-17-2014, 05:00 PM
  2. [SOLVED] Count cells in row based on cell value, highlight row if wrong number or cells.
    By gutterball in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-11-2014, 04:00 PM
  3. Highlight cells for data entry but print workbook with no highlighted cells
    By kheino1111 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-30-2014, 06:51 AM
  4. Search Surrounding Cells and Use Logic Table to Highlight cells
    By Hekagigantes in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-14-2014, 08:36 AM
  5. Replies: 5
    Last Post: 05-18-2013, 07:49 PM
  6. Replies: 4
    Last Post: 01-03-2013, 12:25 AM
  7. clicking on formula doesn't highlight cells in formula
    By john4430 in forum Excel General
    Replies: 5
    Last Post: 01-04-2011, 02:52 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