How to Auto Date a Row when datea is entered?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

A | B | C | D
Date | Debit | Credit | Balance
07/29/06 | 10.00 | | 90.00
07/30/06 | 10.00 | | 80.00
*Formula | | |

*example: @IF(B10+C10=0,"",TODAY())

Can someone help. I would like to write a macro/formula that will put the
date in column a, similar to the foumla I have in the example, however, the
date will remain constant for the time a value was placed in B or C and not
chance when the day change.

Thanks in advance for anyone that has any suggestions or comments on this.

-- L. James
 
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
' date stamp for A when data entered in B
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 2 Then
n = Target.Row
If Excel.Range("B" & n).Value <> "" Then
Excel.Range("A" & n).Value = Format(Now, "dd mmm yyyy")
End If
End If
enditall:
Application.EnableEvents = True
End Sub


Gord Dibben MS Excel MVP
 

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

Back
Top