excel auto add datetime to new row code example Example: excel table row timestamp =IF(A2<>"",IF(B2<>"",B2,NOW()),"")