+ Reply to Thread
Results 1 to 3 of 3

Way to display all changes to data in a column in Excel

Hybrid View

  1. #1
    Registered User
    Join Date
    05-06-2019
    Location
    Baltimore, Maryland
    MS-Off Ver
    365
    Posts
    1

    Way to display all changes to data in a column in Excel

    Looking to find a way to show when data changes in a column.
    Ex: 23.00, 23.00, 45.00, 45.00, 45.00, 60.00, 60.00, 60.00, 70.00
    With the above, there are4 changes that I would want to display, the 23.00, the 45.00, the 60.00 and the 70.00
    How would you do this in Excel?

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Way to display all changes to data in a column in Excel

    Hi and welcome to the forum.

    One way would be with a conditional format.
    With the data in say A1:A10 then create a CF for A1

    Formula: copy to clipboard
    =A1<>A2


    and apply it to the whole range A1:A10
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,432

    Re: Way to display all changes to data in a column in Excel

    .
    This is probably more than you are seeking but it is another approach for all changes :

    Option Explicit
    
    Dim vOldVal 'Must be at top of module
    
    Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    
    Dim bBold As Boolean
    
    
    If Target.Cells.Count > 1 Then Exit Sub
    If ActiveSheet.Name = "Pricing" Then Exit Sub
    
    'On Error Resume Next
    
        With Application
             .ScreenUpdating = False
             .EnableEvents = False
    
        End With
    
        If IsEmpty(vOldVal) Then vOldVal = "Empty Cell"
        bBold = Target.HasFormula
            With Sheets("Tracker")
                '.Unprotect Password:="Secret"
                    If .Range("A1") = vbNullString Then
                        .Range("A1:H1") = Array("Cell Changed", "Old Value", _
                            "New Value", "Old Formula", "New Formula", "Time of Change", "Date of Change", "User")
                    End If
    
                With .Cells(.Rows.Count, 1).End(xlUp)(2, 1)
                      .Value = ActiveSheet.Name & " : " & Target.Address
                      .Offset(0, 1) = vOldVal
                With .Offset(0, 2)
                  If bBold = True Then
                    .ClearComments
                    .AddComment.Text Text:= _
                         "NOTE :" & Chr(10) & "" & Chr(10) & _
                            "Bold values are the results of formulas"
    
                  End If
                    .Value = Target
                    .Font.Bold = bBold
                    
                End With
                    .Offset(0, 3) = Time
                    .Offset(0, 4) = Date
                    .Offset(0, 5) = Application.UserName
                End With
                .Cells.Columns.AutoFit
                '.Protect Password:="Secret"
            End With
    
        vOldVal = vbNullString
    
        With Application
             .ScreenUpdating = True
             .EnableEvents = True
        End With
    On Error GoTo 0
    
    'MsgBox "There was a change to this sheet !"
    End Sub
    
    
    Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
        vOldVal = Target
    End Sub
    
    Private Sub test()
        Application.EnableEvents = True
    End Sub
    Your workbook must have a sheet named Tracker.

    The macro code is pasted in the ThisWorkbook module so it can track all sheets in the workbook.
    Attached Files Attached Files

+ 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. Macro to unlock on click, display certain column data and refresh data
    By justin1202 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-21-2015, 10:02 PM
  2. Search data in one Column, display data from lower down the same column.
    By MAtt1207 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-08-2015, 11:42 AM
  3. data in 2 column and display the desired result in 3rd column
    By vaz_saz in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 01-02-2013, 05:37 PM
  4. Display selective Data in the column
    By RR01 in forum Excel General
    Replies: 3
    Last Post: 11-26-2012, 02:20 AM
  5. Display all rows of data which show specific data in specified column
    By muaddib87 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-02-2012, 01:33 PM
  6. How to display a different value for a column data
    By bilter in forum Excel General
    Replies: 6
    Last Post: 01-20-2012, 11:56 AM
  7. Replies: 3
    Last Post: 11-27-2008, 10:06 PM

Tags for this Thread

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