Excel formula that puts date / time in a cell when data is entered in another cell on the same line

Hoping this can be done with a formula, as I will post this on SharePoint as a shared workbook.

Column B contains tasks, while column E contains the date and time the task completed. Is there a formula that automatically enters the current date and time in column E whenever someone enters data in column B?

Any help would be greatly appreciated.

+4
source share
5 answers

Another way to do this is described below.

First enable iterative calculations under File - Options - Formulas - Enable Iterative Calculation. Then set the maximum iterations to 1000.

.

=If(D55="","",IF(C55="",NOW(),C55))

- D55 ( ), C55 / . / , C55, /, .

, , . , , .

+4

VBA. Excel " " > "" , , , , .

Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column = 2 And Target.Offset(0, 3).Value = "" Then
        Target.Offset(0, 3) = Format(Now(), "HH:MM:SS")
    End If
End Sub

. "if" : (1) , ( B) (2), 3 ( E) .

If Target.Column = 2 And Target.Offset(0, 3).Value = "" Then

, E NOW().

Target.Offset(0, 3) = Format(Now(), "HH:MM:SS")

Range.Offset

Range.Column

+3

, , . , , , .

  • Excel
  • "Alt + F11"
  • , ().
  • /
  • Range (:) ,
  • Offset (0, _) , ( D, , F, "2" 2 D)
  • , , .
  • , , "" , "####"

/ :


Sub Worksheet_Change (ByVal Target As Range)

If Intersect(Target, Range("D:D")) Is Nothing Then Exit Sub
Target.Offset(0, 2) = Date

Sub


...

+1

, . , .

- E ( "dd/mm/yyyy hh: mm" ):

=If(B1="";"";Now())

, .

.

0

You can use the If function. Write in the cell where you want to enter the date of the following formula: = IF ( MODIFIED-CELLNUMBER <> ", IF ( CELLNUMBER-WHERE TO ENTER-DATE =" ", now (), CELLNUMBER- WHERE- TO-INPUT-DATE ), "")

0
source

Source: https://habr.com/ru/post/1544215/


All Articles