Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Flag Rows that were Changed

Posted on 2013-01-29
5
Medium Priority
?
320 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

671 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