+ Reply to Thread
Results 1 to 12 of 12

NOON for 12:00 PM

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    01-12-2004
    Location
    Nebraska, USA
    MS-Off Ver
    Office 365
    Posts
    167

    NOON for 12:00 PM

    How should the formula read to check the TIME value of a certain cell for 12:00 PM?
    If the TIME in the referenced cell is 12:00 PM...return NOON.

    Here is what I have...and it doesn't work:

    =IF(DATA!C12="","",IF(DATA!C12=(TIME(12,0,0)),"NOON",DATA!C12))
    Last edited by HuskerBronco; 12-14-2008 at 06:19 PM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,844
    That formula should work assuming Data!C12 contains just a time.

    What's in C12, is it generated by a formula?

  3. #3
    Forum Contributor
    Join Date
    01-12-2004
    Location
    Nebraska, USA
    MS-Off Ver
    Office 365
    Posts
    167
    What's in C12, is it generated by a formula?
    When I select the cell, this is what shows in the formula bar:

    12:00:00 PM
    The cell (C12) is TIME formatted, and the time entered comes from a drop-down list containing all times from 10:00 AM to 11:00 PM...incremented every 30 minutes.
    The NAMED RANGE that the drop-down list comes from DID contain formulas...but I overwrote them with TIME values...and it still didn't work.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Format C12 as General and what do you see?
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Contributor
    Join Date
    01-12-2004
    Location
    Nebraska, USA
    MS-Off Ver
    Office 365
    Posts
    167
    Format C12 as General and what do you see?
    In the formula bar... 0.499999998666667

    And...it still says 12:00 PM in the target cell. (Not NOON)

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Well -- that's not noon.

    You could use DLL's suggestion, or fix the drop-down ...

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,844
    Excel sometimes behaves oddly when you increment times like that. I can't replicate the specific problem, though. What formula did you use to increase the time by 30 minutes?

    Try using this version

    =IF(TEXT(DATA!C12,"h:mm")="12:00","NOON",DATA!C12)

  8. #8
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    13,019
    I just tried your formula and it worked for me. You said that "... it doesn't work ..." so what do you see instead of "NOON"? Also, if the time in C12 is supposedly 12:00:00 and you temporarily change the cell format to numeric is it 0.50000? If you change the formula to:
    
    =IF(DATA!C12="","",IF(DATA!C12=0.5,"NOON",DATA!C12))
    what does it display?
    Ben Van Johnson

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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