Flag column if changed

I am interested in simply flagging the column using VBA  if anything (in that column alone) has changed.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

[ fanpages ]IT Services ConsultantCommented:
How or where would the flagging be recorded?

Internally within Visual Basic for Applications code for later interrogation, visually in-cell somewhere within the same column, or elsewhere (such as a different worksheet, or in an external file, for example)?
BirdWatchersAuthor Commented:
I am just going to put a 1 in row 16 of that column  I have an if statement that will trigger logic if the column has changed, but I don't know how to flag if the column has changed.
Martin LissOlder than dirtCommented:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(ActiveCell, Range("C1:C100000")) Is Nothing Then
    Columns(3).Select ' or do something else
    End If
End Sub

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

BirdWatchersAuthor Commented:
There could be anywhere from 50 to 4,000 rows of data  - I just need to now if just one piece has changed in the one column .. that is it.
Martin LissOlder than dirtCommented:
Mine works on column C but that's easily changed.
[ fanpages ]IT Services ConsultantCommented:
Something like this may be what you are looking for...

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)

  Dim objCell                                           As Range
  On Error Resume Next
  Application.ScreenUpdating = False
  Application.EnableEvents = False
  For Each objCell In Target
      If objCell.Row <> 16& Then
         Me.Cells(16&, objCell.Column).Value = 1
      End If ' If objCell.Row <> 16& Then
  Next objCell ' For Each objCell In Target
  Application.EnableEvents = True
  Application.ScreenUpdating = True

End Sub

Open in new window

Please see the attached workbook.

PS. It could be improved by only processing one cell from each column in the Target range, but typically the Worksheet_Change(...) event will only ever process one cell at a time anyway, so that approach may well be just for very extreme cases.

The code above copes with changing multiple cells at once, though.
Martin LissOlder than dirtCommented:
Simply this where 3 represents column C..

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Columns(3)) Is Nothing Then
    Cells(16, 3) = 1
    End If
End Sub

Open in new window

Martin LissOlder than dirtCommented:
I'm glad I was able to help. If you actually chose one of my solutions that used 'ActiveCell', you should substitute 'Target'.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2015, Experts-Exchange Top Expert Visual Basic Classic 2012 to 2014
[ fanpages ]IT Services ConsultantCommented:
You're welcome, BirdWatchers.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.