+ Reply to Thread
Results 1 to 6 of 6

Highlight changes if orginial cell value has changed

  1. #1
    Registered User
    Join Date
    04-11-2011
    Location
    canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    Highlight changes if orginial cell value has changed

    hi, i have the vba below who alow me to hightlight changes if the orginial cell value has changed. the problem is that it's stay highlight week after week and the goal is to know if there was a change last week. So the ideal is to insert a vba that would say hightlight if the cell value has changed between 7 days ago and today. what changes do I need to do?
    p.s: i work with excel 2010 thanks

    Private Sub Worksheet_Change(ByVal Target As Range)
    Const WS_RANGE As String = "F10:F309"

    On Error GoTo ws_exit:
    Application.EnableEvents = False
    If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
    With Target
    .Interior.ColorIndex = 6
    End With
    End If

    ws_exit:
    Application.EnableEvents = True
    End Sub
    Last edited by max P.; 04-13-2011 at 12:42 PM.

  2. #2
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Highlight changes if orginial cell value has changed

    Hi,

    Welcome to the forum.
    Please read the rule about using code tags when you are posting a message. Aside from that how would you determine if something has changed with in the range that you specified?
    Could you attach a copy of your workbook with a before and after example?
    Charles

    There are other ways to do this, this is but 1 !
    Be Sure you thank those who helped.
    IF YOU'RE SATISFIED BY ANY MEMBERS RESPONSE TO YOUR ISSUE PLEASE USE THE STAR ICON AT THE BOTTOM LEFT OF THE POST UNDER THEIR NAME.

  3. #3
    Registered User
    Join Date
    04-11-2011
    Location
    canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Highlight changes if orginial cell value has changed

    i would determine if something has changed if the cell valu is different. example, a cell have a date 2011-04-11 and right after someone change it for 2011-04-15 the cell would turn highlight yellow.

    sorry but i'm not sure what you want me to copy before and after.

    thanks

  4. #4
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: Highlight changes if orginial cell value has changed

    Quote Originally Posted by max P. View Post
    sorry but i'm not sure what you want me to copy before and after.

    thanks
    Charles is speaking of Forum Rule #3
    Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
    John Wright

  5. #5
    Registered User
    Join Date
    04-11-2011
    Location
    canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Highlight changes if orginial cell value has changed

    Please Login or Register  to view this content.
    here is the code that i have copyed in my workbook

  6. #6
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Highlight changes if orginial cell value has changed

    Max P


    Try the following code in your sheet code module.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

+ 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.6.0 RC 1