IF

E

Eán

How would I write a formula that if any of the cells in a certain row were
changed the 'A' coloum of that row would return a value of "updated"?

Please and thank you
 
J

JE McGimpsey

You can't do that with a function.

You CAN do that with an event macro. Put this in your worksheet code
module (right-click the worksheet tab and choose View Code):

If you mean that an entry in ANY row should return updated to the column
A cell in that row:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Cells.Count = 1 Then _
Cells(.Row, 1).Value = "updated"
End With
End Sub

If you mean only a single "certain" row:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If Not Intersect(.Cells, Range("3:3")) Is Nothing Then _
Cells(.Row, 1).Value = "updated"
End With
End Sub


if you mean a range of rows, you can adjust the Range in the second
example, e.g.:

If Not Intersect(.Cells, Range("3:9,12:13")) Is Nothing Then _
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top