+ Reply to Thread
Results 1 to 5 of 5

Entering text depending on time

  1. #1
    Registered User
    Join Date
    06-25-2013
    Location
    Idaho, USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Entering text depending on time

    This seems fairly simple and I'm sure it's been answered, but I can't find anything on it. I've got times listed in one column in AM/PM format and I just need to drop a 1 or 2 in another column depending on the time. I need a 1 for anything between 6:00 AM - 6:00 PM and a 2 for 6:00 PM - 6:00 AM.
    Thanks in advance.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Entering text depending on time

    Try

    =OR(A1<"06:00:00"+0,A1>"18:00:00"+0)+1

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Entering text depending on time

    =if(and(a3>0.25,a3<=0.75),1,2)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Registered User
    Join Date
    06-25-2013
    Location
    Idaho, USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Entering text depending on time

    Wow I didn't expect a response so quick. Thanks guys, the =OR works perfectly.

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Entering text depending on time

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Input text into a cell depending on the time
    By Robbosan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-17-2013, 09:02 AM
  2. Replies: 2
    Last Post: 03-18-2013, 10:12 PM
  3. Entering a formula depending on criteria of cell
    By drgogo in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 03-10-2010, 11:14 AM
  4. display end time automatically upon entering start time and time usage
    By stoey in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-19-2008, 06:16 PM
  5. [SOLVED] Entering date depending on another cell being populated
    By wurz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-21-2006, 07:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1