PC Review


Reply
Thread Tools Rate Thread

Changes to Data on a Worksheet

 
 
bc@brianjwc.vispa.com
Guest
Posts: n/a
 
      19th Feb 2008
I have a data entry sheet (Excel 2000) and a "store" sheet. The info
on the data entry sheet is saved on a single row in the store sheet. I
need to detect whether any changes have been made to the details on
the data entry page and currently do this by concatenating every data
cell on the data sheet and comparing it to the concatenated cells on
the corresponding row in the store. Is there an easier way to detect
whether any changes have been made on the data entry page?

Thanks for any help.
Brian
 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      19th Feb 2008
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "H1" '<== change to suit
Dim cell As Range
Dim rng As Range
Dim i As Long

On Error GoTo ws_exit
Application.EnableEvents = False

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then

With Target

For i = 2 To Me.Cells(Me.Rows.Count, "A").End(xlUp).Row

If Me.Cells(i, "A").Value < .Value Then

If rng Is Nothing Then

Set rng = Me.Rows(i)
Else

Set rng = Union(Me.Rows(i), rng)
End If
End If
Next i

If Not rng Is Nothing Then rng.Delete
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



<(E-Mail Removed)> wrote in message
news:531d55d4-60f9-443a-8955-(E-Mail Removed)...
>I have a data entry sheet (Excel 2000) and a "store" sheet. The info
> on the data entry sheet is saved on a single row in the store sheet. I
> need to detect whether any changes have been made to the details on
> the data entry page and currently do this by concatenating every data
> cell on the data sheet and comparing it to the concatenated cells on
> the corresponding row in the store. Is there an easier way to detect
> whether any changes have been made on the data entry page?
>
> Thanks for any help.
> Brian



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy/pasting data into a worksheet and then sorting worksheet Pierrette T Microsoft Excel Programming 0 11th Nov 2009 03:23 AM
Scan data on worksheet 2 and display a summary on Worksheet 1 =?Utf-8?B?U29ueQ==?= Microsoft Excel Programming 0 29th Jan 2007 08:27 PM
Using a Worksheet Form to add data to a separate worksheet databas =?Utf-8?B?UmF3Ymx5bg==?= Microsoft Excel Worksheet Functions 3 7th Mar 2006 08:17 PM
Using a column of data from 1 worksheet to extract data from another worksheet banderson@nwws.biz Microsoft Excel Worksheet Functions 2 23rd Feb 2006 04:33 PM
Attaching a JET database to an Excel Worksheet OR storing large binary data in a worksheet Ant Waters Microsoft Excel Programming 1 3rd Sep 2003 11:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:44 AM.