Solved

Flag Rows that were Changed

Posted on 2013-01-29
5
298 Views
Last Modified: 2013-01-29
Hello All,

I am in a issue. There is sheet with three possible columsn – where user can enter the data and changes the existing value. How do I flag the rows using worksheet change event of any other VBA ways  - that will tell me that a particular row has been changed if any of the three column (C1,C2,C3) values have changed for a row.

For example: if C1 column value of row 7 has changed, and  if C3 value of row 10 has changed, then those two rows are flagged as “changed” somehow and a new column or something stores that info.

I am doing this so that I can auto filter by that “CHANGED ” COLUMN

C1      C2      C3      dsads
eq            ew      
wq      e      ew      
qwe      wqe      wqe      
qwe      wqe            
qwe      we            
qwe      we
sheetCahnge.xlsx
0
Comment
Question by:Rayne
  • 3
  • 2
5 Comments
 

Author Comment

by:Rayne
ID: 38831105
worksheet change event or anything really - how can I do it?
0
 
LVL 26

Accepted Solution

by:
redmondb earned 500 total points
ID: 38831181
Hi, Rayne.

Please see attached. The code is...
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
Dim xRange As Range
Dim xCell As Range

Set xRange = Intersect(Me.Range("D6:F12"), Target)

If xRange Is Nothing Then Exit Sub

Application.EnableEvents = False

    For Each xCell In xRange
        xCell.Font.Color = -16776961
        Me.Cells(xCell.Row, 7) = True
    Next

Application.EnableEvents = True

End Sub

Open in new window

Regards,
Brian.sheetCahnge-V2.xlsm
0
 

Author Comment

by:Rayne
ID: 38831913
Perfect Brian, this works like Gold
0
 
LVL 26

Expert Comment

by:redmondb
ID: 38832098
Thanks, Rayne.
0
 

Author Comment

by:Rayne
ID: 38833070
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you how to use shortcut menus in the Access run-time environment.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question