Solved

Flag Rows that were Changed

Posted on 2013-01-29
5
270 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

My experience with Windows 10 over a one year period and suggestions for smooth operation
Outlook Free & Paid Tools
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

707 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now