+ Reply to Thread
Results 1 to 7 of 7

Convert date and time into Diffrent text.

  1. #1
    Forum Contributor visha_1984's Avatar
    Join Date
    11-27-2012
    Location
    Pune,India
    MS-Off Ver
    Excel 2010
    Posts
    290

    Convert date and time into Diffrent text.

    Hi,Team

    I have an data in sheet 1 , I Have mentioned 3 remark in col B
    1) BACKDATED SO --- if date is backdated
    2) SO RECEIVED BEFORE 3:00 PM ------if date is today but if it is before 3:00 PM
    3) SO RECEIVED AFTER 3:00 PM--------if date is today but if it is after 3:00 PM

    I am looking for formula any help very much appriciate.
    I have attached an example sheet.
    Attached Files Attached Files
    Happy to Help

    VISHA

    Click *, if the suggestion helps you!
    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>> "Mark your thread as Solved"

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

    Re: Convert date and time into Diffrent text.

    In B2

    =IF(INT(A2)=TODAY(),IF(A2-INT(A2)<15/24,"SO RECEIVED BEFORE 3:00 PM","SO RECEIVED AFTER 3:00 PM"),"BACKDATED SO")

    Copy down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Convert date and time into Diffrent text.

    =Int(a1) anf format as date gives you the date

    =MOD(A1,1) and format as time gives you the time.

    So using some "if" you get your result.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Convert date and time into Diffrent text.

    You can use this formula in C2:

    =IF(A2<TODAY(),"Backdated SO","SO Received "&IF(HOUR(A2)<15,"BEFORE","AFTER")&" 3:00pm")

    then copy down. It is not possible, though, using a formula to get different colours for the words BEFORE and AFTER.

    Hope this helps.

    Pete

  5. #5
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Convert date and time into Diffrent text.

    hi visha. do adjust the formula accordingly to accommodate 3 pm. the formula Ace_XL provided would go through 2 tests;
    1) whether the date in Column A is today
    2) whether the time in Column A is less than 3pm

    so today's date at 3 pm will pass the first test but fail the 2nd. hence categorized that as AFTER 3pm. it depends on what you want. if it's supposed to be together with BEFORE 3pm, then:
    =IF(INT(A2)=TODAY(),IF(A2-INT(A2)<=15/24,"SO RECEIVED BEFORE 3:00 PM","SO RECEIVED AFTER 3:00 PM"),"BACKDATED SO")

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Convert date and time into Diffrent text.

    another
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  7. #7
    Forum Contributor visha_1984's Avatar
    Join Date
    11-27-2012
    Location
    Pune,India
    MS-Off Ver
    Excel 2010
    Posts
    290

    Re: Convert date and time into Diffrent text.

    Thanks u very much Guys all the formula works fine.
    Good day

+ 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