ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Recording a range of changed cells. (https://www.excelbanter.com/excel-programming/387525-recording-range-changed-cells.html)

Larry Cooke

Recording a range of changed cells.
 
I have some sheets that I need to note if any of the columns within a given
row has been changed. To clarify columns A1:Q1 have data which can be
changed, I'd like to have cell Srow# set to True if anyone of the items in
column A-Q have been changed.

I added this code below:

Private Sub Worksheet_Change(ByVal Target As Range)

Dim iRow As Integer

iRow = Target.Row
Cells(iRow, 19).Value = True

End Sub

This works great, execpt for one thing, I can never delete the True value
cause this code intercepts that as a change. Is there a way to monitor only
columns A-Q?

Hope this makes sense.

TIA

Larry

Barb Reinhardt

Recording a range of changed cells.
 
if not intersect(target,range("A:Q")) is nothing then

Perform what you want

ENd if

"Larry Cooke" wrote:

I have some sheets that I need to note if any of the columns within a given
row has been changed. To clarify columns A1:Q1 have data which can be
changed, I'd like to have cell Srow# set to True if anyone of the items in
column A-Q have been changed.

I added this code below:

Private Sub Worksheet_Change(ByVal Target As Range)

Dim iRow As Integer

iRow = Target.Row
Cells(iRow, 19).Value = True

End Sub

This works great, execpt for one thing, I can never delete the True value
cause this code intercepts that as a change. Is there a way to monitor only
columns A-Q?

Hope this makes sense.

TIA

Larry


Larry Cooke

Recording a range of changed cells.
 
Thank you very much Barb, it's working like a charm now.

Larry

"Barb Reinhardt" wrote:

if not intersect(target,range("A:Q")) is nothing then

Perform what you want

ENd if

"Larry Cooke" wrote:

I have some sheets that I need to note if any of the columns within a given
row has been changed. To clarify columns A1:Q1 have data which can be
changed, I'd like to have cell Srow# set to True if anyone of the items in
column A-Q have been changed.

I added this code below:

Private Sub Worksheet_Change(ByVal Target As Range)

Dim iRow As Integer

iRow = Target.Row
Cells(iRow, 19).Value = True

End Sub

This works great, execpt for one thing, I can never delete the True value
cause this code intercepts that as a change. Is there a way to monitor only
columns A-Q?

Hope this makes sense.

TIA

Larry



All times are GMT +1. The time now is 10:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com