+ Reply to Thread
Results 1 to 4 of 4

Displaying text depending on result from other formula

  1. #1
    Registered User
    Join Date
    10-26-2011
    Location
    Bosnia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Displaying text depending on result from other formula

    Hello all,

    I need a help, it might be very simple, but I can't solve it.
    Problem: I have a cell D1, that calculates time from other cells, and depending on the result, I need cell D2 to show text.

    Example:
    If time in cell D1 is less than 8:00 hours, Cell D2 would show "Text 1"
    If time in cell D1 is more than 8:00, but less than 12:00 hours, Cell D2 would show "Text 2"
    If time in cell D1 is more than 12:00 hours, Cell D2 would show "Text 3"

    Thanks.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Displaying text depending on result from other formula

    Hi and welcome to the board

    Do you mean you have a number of hours in D1 or date and time?

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Displaying text depending on result from other formula

    Hello,

    set up a lookup table like this, for example starting in cell G1
    Please Login or Register  to view this content.
    Then you can use this formula in D2

    =VLOOKUP(D1,G1:H3,2,TRUE)

    It's not quite clear what you want to display for exactly 8:00 and 12:00, so you may want to edit the table to show 8:01 and 12:01, depending on what result you prefer.

    cheers,

  4. #4
    Registered User
    Join Date
    10-26-2011
    Location
    Bosnia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Displaying text depending on result from other formula

    Thank you very much, it helps.

    And yes, it's only hours in D1.

+ 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