ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   time and date formula (https://www.excelbanter.com/excel-worksheet-functions/7225-time-date-formula.html)

Brian

time and date formula
 
Hello,

Can someone help me with this one?

in Cell A1 I would like to have the current Time and date ( in that order)
returned if Cell B1 contains any data text or numbers in it. Otherwise I
would like Cell A1 to be blank if B1 is blank.

Thank You
Brian



Dave Peterson

=if(b1="","",now())

Format A1 to include both the time and date:

hh:mm:ss mm/dd/yyyy

Brian wrote:

Hello,

Can someone help me with this one?

in Cell A1 I would like to have the current Time and date ( in that order)
returned if Cell B1 contains any data text or numbers in it. Otherwise I
would like Cell A1 to be blank if B1 is blank.

Thank You
Brian


--

Dave Peterson

Brian

Thank You
that worked great, One problem is that i did not realize that it does not
stay the time originally entered.
If I enter data in b1 and hit return the current time is inserted ex 2100
but one minute later if I enter data somewhere else on the sheet, unrelated
the A1 cell, the time changes to 2101, how can I make it so that the current
time entered acts as a time stamp and does not change?
Thanks
brian

"Dave Peterson" wrote:

=if(b1="","",now())

Format A1 to include both the time and date:

hh:mm:ss mm/dd/yyyy

Brian wrote:

Hello,

Can someone help me with this one?

in Cell A1 I would like to have the current Time and date ( in that order)
returned if Cell B1 contains any data text or numbers in it. Otherwise I
would like Cell A1 to be blank if B1 is blank.

Thank You
Brian


--

Dave Peterson


Max

"Brian" wrote
....
.. how can I make it so that the current
time entered acts as a time stamp and does not change?


Try JE's "DateTimeStamp Macro" at his page:
http://www.mcgimpsey.com/excel/timestamp.html
(Scroll down the page)
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----




All times are GMT +1. The time now is 11:22 PM.

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