+ Reply to Thread
Results 1 to 3 of 3

Thread: Highlight cells based on other cells value

  1. #1
    Registered User
    Join Date
    02-10-2012
    Location
    U.S.A.
    MS-Off Ver
    Excel 2010
    Posts
    1

    Highlight cells based on other cells value

    I need to find out how to highlight a cell (say G34) if cell B34's value is between 70 and 77. I am needing to do this for the entire row of 34 depending on the value of B34. Another example would be to highlight M34 if the value in B34 is between 115 and 122(I could round up or down if need be)
    Here is a picture of an example:http://i214.photobucket.com/albums/c...BellCurve1.jpgBell Curve1.jpg

  2. #2
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel 2007
    Posts
    825

    Re: Highlight cells based on other cells value

    hi,
    try this, make changes for yr needs and see if it helps you
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Range("A1").Value < 77 And Range("A1").Value > 70 Then
            [a2].EntireRow.Interior.ColorIndex = 4  
        Else
        [a2].EntireRow.Interior.ColorIndex = xlNone
        End If
    End Sub
    
    'if you need to color just a cell modify it as [a2].Interior.ColorIndex = 4
    Regards, John

  3. #3
    Valued Forum Contributor Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens Greece
    MS-Off Ver
    Excel 2003
    Posts
    2,297

    Re: Highlight cells based on other cells value

    Hi and welcome to the forum.

    You can do this, using Conditional Format.

    Format>>Conditional Format>>Formula is:

    =AND(B34>=115,B34<=122)
    >> Choose color>>OK.

    Hope to helps you.

    **A picture does not help us.
    Regards

    Fotis.

    I am proud that i am Greek.

    Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?

    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.


    My Avadar picture, is from Athens Acropolis.
    http://www.theacropolismuseum.gr

    http://www.visitgreece.gr/

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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.2.0