+ Reply to Thread
Results 1 to 4 of 4

Highlight edited changes in data

  1. #1
    Forum Contributor
    Join Date
    02-15-2012
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2019
    Posts
    431

    Highlight edited changes in data

    Hi,

    Need a VBA code or any other way to highlight the cell wherever someone edit the cells (data pasted from other source should be ignored and should not be highlighted).

    An excel file attached with necessary details.

    Kindly help.

    Nagesh.
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Highlight edited changes in data

    If we assume that copying/pasting from elsewhere will be done for multiple cells, then that does not count as a change.
    (If only copying/pasting one cell, it is considered a change.)
    This code is placed in the worksheet module, triggering any changes in the cell and highlighting them.
    PHP Code: 
    Option Explicit
    Private Sub Worksheet_Change(ByVal Target As Range)
    If 
    Intersect(TargetRange("E:F")) Is Nothing Then Exit Sub
    If Target.CountLarge 1 Then Exit Sub
    Target
    .Interior.Color vbYellow
    End Sub 
    Attached Files Attached Files
    Quang PT

  3. #3
    Registered User
    Join Date
    02-12-2024
    Location
    Australia
    MS-Off Ver
    365
    Posts
    9

    Re: Highlight edited changes in data

    Quote Originally Posted by bebo021999 View Post
    If we assume that copying/pasting from elsewhere will be done for multiple cells, then that does not count as a change.
    (If only copying/pasting one cell, it is considered a change.)
    Why would you assume that?

    The function below will check to see if the last action was a 'paste'.
    It will return true if the change was made with a paste and false if it was changed in any other manner.

    So put this line in your change event to ignore the change if it was pasted.

    Please Login or Register  to view this content.
    The function;
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    02-15-2012
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2019
    Posts
    431

    Re: Highlight edited changes in data

    Hi Bebo,

    As per initial trials, its working perfectly and as per requirement.

    For now, marking the thread as solved.

    Will get back to you if i find any issue during the usage.

    Thank you so much.

    @Eeza

    Thank you so much to you too for your code.

+ 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. Replies: 4
    Last Post: 06-27-2020, 06:00 AM
  2. [SOLVED] Add row when data is entered in a cell, but do not repeat it if the data is edited later
    By Excelbuddy_7 in forum Excel Programming / VBA / Macros
    Replies: 30
    Last Post: 12-10-2015, 08:56 AM
  3. Color highlight on change (Edited) cells
    By hiteshkumar21483 in forum Excel General
    Replies: 3
    Last Post: 08-12-2014, 02:52 AM
  4. Replies: 1
    Last Post: 02-02-2013, 08:00 PM
  5. VBA Code For Once We Entered Data In Sheet then Data Should Not Be Edited or Deleted
    By sgolwalkar4ever in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-25-2012, 04:00 AM
  6. Replies: 1
    Last Post: 12-30-2009, 09:04 PM
  7. Should Merging workbooks pick up new data or only edited data?
    By Peggy L. in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-13-2005, 02:06 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