+ Reply to Thread
Results 1 to 5 of 5

Highlighting a range of cells, only when a certain range of cells is selected

  1. #1
    Registered User
    Join Date
    06-11-2015
    Location
    United States
    MS-Off Ver
    2016
    Posts
    26

    Highlighting a range of cells, only when a certain range of cells is selected

    Hello,

    I have one worksheet, that has 2 different sets of useful information within the columns i am trying to conditional format.

    I am trying to create 2 different conditional formats, one for the first set of columns, and then another for the second set of columns.

    I want to be able to select a cell, and then it highlight all the cells on that row that are in the first set of columns...( i figured out how to make it work by highlighting the entire row, but the problem with this in my situation is the rows dont match up when i get to the second half of important columns.

    Does anyone know how i can only highlight certain columns rather than the whole row.

    The code i am using right now is
    Please Login or Register  to view this content.
    im thinking i need to do something like this:
    Please Login or Register  to view this content.
    but i don't know how to include a set columns, not just the one (AG) or all by using (row)

    hopefully someone can help me.

    I'm not posting the sheet on here because i feel like if i know the correct syntax code to use i can apply it myself.


    Thanks!

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    4,729

    Re: Highlighting a range of cells, only when a certain range of cells is selected

    To check if the value exist in the range you want: See the use of the MATCH in VBA: Application.WorksheetFunction.Match(...)
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    06-11-2015
    Location
    United States
    MS-Off Ver
    2016
    Posts
    26

    Re: Highlighting a range of cells, only when a certain range of cells is selected

    im not sure exactly what i did, but somehow i got it to work the way i want.. is there a way to delete post? or marked as solved?

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    4,507

    Re: Highlighting a range of cells, only when a certain range of cells is selected

    It would be nice if, for other people with the same or similar problem that are searching for a solution, you showed the complete code.

  5. #5
    Registered User
    Join Date
    06-11-2015
    Location
    United States
    MS-Off Ver
    2016
    Posts
    26

    Re: Highlighting a range of cells, only when a certain range of cells is selected

    Sure, that's a great idea!

    Ok, so i had my first section of columns that when i selected a name, i wanted the worksheet to find that name within an array of all the names and a few pieces of information about each person, and highlight that row, but only 9 columns.

    so i applied this formatting to the cells that i wanted to be highlighted..
    Please Login or Register  to view this content.
    and then further over, my next set of columns, i had all those names again but with a lot of information about each employee, so much, that i had to repeat the names multiple times so i could see what name i was looking at (52 columns to be exact).. anyways, i wanted just those 52 columns to highlight whatever row i was on.. i did this by applying the formatting to all 52 columns
    Please Login or Register  to view this content.
    and wallaa! It's not perfect, because when i select a name from the first set of columns it still highlights that row of the second set of columns, that doesn't necessarily associate with the correct person that i selected.. but because those rows are so far over, i don't even really see them on the screen.

    So my way was more a work around, but it works for me.. I'm not sure how to make it not highlight the second set of columns if I'm selecting something from the first set.

    If anyone does know how to do that, I would love to know, and it might help others too as jolivanes mentioned.
    If not, it's okay, I am content with what i have now.

+ 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. Help highlighting cells in a date range
    By Terrehpin in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-21-2019, 10:15 AM
  2. [SOLVED] Macro to copy cells from a selected range and just paste values back to that same range
    By catscats11 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-18-2019, 02:59 PM
  3. [SOLVED] Need help highlighting cells if the number falls within a range
    By ajanson in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-16-2018, 01:48 PM
  4. Highlighting range of cells
    By neilq5 in forum Excel General
    Replies: 6
    Last Post: 06-08-2012, 07:28 AM
  5. Highlighting a range of cells dependant on data in any of those cells
    By Grimace in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-20-2009, 02:34 AM
  6. Highlighting if a range of cells meet a value
    By Davidcc in forum Excel General
    Replies: 38
    Last Post: 01-25-2008, 09:22 AM
  7. Compare a selected Range with a Named range and select cells that do not exist
    By PCLIVE in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2005, 03:05 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