ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Enter text automatically based on current time (https://www.excelbanter.com/excel-discussion-misc-queries/157439-enter-text-automatically-based-current-time.html)

jmj713

Enter text automatically based on current time
 
I have a read-only spreadsheet that's used twice on a daily basis. Text is
entered in the morning and in the afternoon. I was trying to come up with a
formula to ease some of this routine text-entering. Specifically, is it
possible for Excel to enter "Some Text 1" into an empty cell, provided the
file is opened when the current time is AM, and "Some Text 2" when the file
is opened when the current time is PM?

David Biddulph[_2_]

Enter text automatically based on current time
 
=IF(MOD(NOW(),1)<0.5,"Some Text 1","Some Text 2")
If you want the text to stay after the initial entry, copy, and paste
special/ values.
--
David Biddulph

"jmj713" wrote in message
...
I have a read-only spreadsheet that's used twice on a daily basis. Text is
entered in the morning and in the afternoon. I was trying to come up with
a
formula to ease some of this routine text-entering. Specifically, is it
possible for Excel to enter "Some Text 1" into an empty cell, provided the
file is opened when the current time is AM, and "Some Text 2" when the
file
is opened when the current time is PM?




jmj713

Enter text automatically based on current time
 
Thanks so much! You have saved us some time with this.

"David Biddulph" wrote:

=IF(MOD(NOW(),1)<0.5,"Some Text 1","Some Text 2")
If you want the text to stay after the initial entry, copy, and paste
special/ values.
--
David Biddulph

"jmj713" wrote in message
...
I have a read-only spreadsheet that's used twice on a daily basis. Text is
entered in the morning and in the afternoon. I was trying to come up with
a
formula to ease some of this routine text-entering. Specifically, is it
possible for Excel to enter "Some Text 1" into an empty cell, provided the
file is opened when the current time is AM, and "Some Text 2" when the
file
is opened when the current time is PM?





Jim Thomlinson

Enter text automatically based on current time
 
You could use a formula kind of like this...

=IF(MOD(NOW(),1)<=0.5, "AM", "PM")
--
HTH...

Jim Thomlinson


"jmj713" wrote:

I have a read-only spreadsheet that's used twice on a daily basis. Text is
entered in the morning and in the afternoon. I was trying to come up with a
formula to ease some of this routine text-entering. Specifically, is it
possible for Excel to enter "Some Text 1" into an empty cell, provided the
file is opened when the current time is AM, and "Some Text 2" when the file
is opened when the current time is PM?



All times are GMT +1. The time now is 04:11 AM.

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