+ Reply to Thread
Results 1 to 5 of 5

IF Statement help to display differe text for different results

  1. #1
    Registered User
    Join Date
    10-22-2018
    Location
    North Leeds
    MS-Off Ver
    2010
    Posts
    21

    IF Statement help to display differe text for different results

    Morning All = Hope you are safe and well

    I'm having difficulty putting the following into an IF statement...basically when the value changes a letter from the range A - G I want the appropriate text to display - how can I do this?

    (H3="A","As New - Asset is in good operational condition. with no defects and/or within warranty period","")
    (H3="B","Good - Asset is in good operational condition, with no recent defects and out of warranty period. No evidence of significant degradation.","")
    (H3="C","Acceptable - Asset is in good operational condition, with no recent defects and evidence appropriate maintenance has been carried out. Minor repairs may be required.","")
    (H3="D","Poor - Asset showing signs of wear, may require refurbishment or upgrade within the next 3 to 5 years. Increased reliability issues not managed by planned maintenance.","")
    (H3="E","Unacceptable - Asset failure, awaiting repair approval. Major refurbishment/overhaul required. Non compliant against statutory requirements.","")
    (H3="F","Beyond Expected Lifecycle - Asset in poor condition and beyond its expected Lifecycle","")
    (H3="G","Asset Not Required - Asset is redundant, not required. Asset to be decommissioned.","")

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: IF Statement help to display differe text for different results

    Create a lookup table with the criteria, then use a simple VLOOKUP:

    I3: =VLOOKUP(H3,$A$9:$B$15,2,0)

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    1
    2
    3
    E Unacceptable - Asset failure, awaiting repair approval. Major refurbishment/overhaul required. Non compliant against statutory requirements.
    4
    5
    6
    7
    8
    9
    A As New - Asset is in good operational condition. with no defects and/or within warranty period
    10
    B Good - Asset is in good operational condition, with no recent defects and out of warranty period. No evidence of significant degradation.
    11
    C Acceptable - Asset is in good operational condition, with no recent defects and evidence appropriate maintenance has been carried out. Minor repairs may be required.
    12
    D Poor - Asset showing signs of wear, may require refurbishment or upgrade within the next 3 to 5 years. Increased reliability issues not managed by planned maintenance.
    13
    E Unacceptable - Asset failure, awaiting repair approval. Major refurbishment/overhaul required. Non compliant against statutory requirements.
    14
    F Beyond Expected Lifecycle - Asset in poor condition and beyond its expected Lifecycle
    15
    G Asset Not Required - Asset is redundant, not required. Asset to be decommissioned.
    Sheet: Sheet1

    The lookup table can be anywhere in your workbook, even on a different sheet.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    10-22-2018
    Location
    North Leeds
    MS-Off Ver
    2010
    Posts
    21

    Re: IF Statement help to display differe text for different results

    Id prefer to write it in an IF statement? how could I do this

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: IF Statement help to display differe text for different results

    Why?

    What is the perceived benefit? As a seasoned Excel user, I can tell you that the disadvantages will outweigh the benefits, but if you insist ...

    =IF(H3="A","As New - Asset is in good operational condition. with no defects and/or within warranty period",IF(H3="B","Good - Asset is in good operational condition, with no recent defects and out of warranty period. No evidence of significant degradation.",IF(H3="C","Acceptable - Asset is in good operational condition, with no recent defects and evidence appropriate maintenance has been carried out. Minor repairs may be required.",IF(H3="D","Poor - Asset showing signs of wear, may require refurbishment or upgrade within the next 3 to 5 years. Increased reliability issues not managed by planned maintenance.",IF(H3="E","Unacceptable - Asset failure, awaiting repair approval. Major refurbishment/overhaul required. Non compliant against statutory requirements.",IF(H3="F","Beyond Expected Lifecycle - Asset in poor condition and beyond its expected Lifecycle",IF(H3="G","Asset Not Required - Asset is redundant, not required. Asset to be decommissioned.","")))))))

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: IF Statement help to display differe text for different results

    "Why make things easy when they also work the hard way"....

    =CHOOSE(CODE(H3)-64, sentence_1,sentence_2,etc...)
    Last edited by Pepe Le Mokko; 04-08-2020 at 08:21 AM.

+ 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] If Statement with Text results.
    By RichardJSigKits in forum Excel General
    Replies: 4
    Last Post: 07-26-2016, 07:47 AM
  2. [SOLVED] Finding text in a data table and display results
    By vbarookie_1000 in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 02-20-2015, 02:52 PM
  3. [SOLVED] IF Statement with 3 text Results
    By dpierce in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-05-2014, 02:41 AM
  4. Replies: 4
    Last Post: 05-16-2013, 06:24 AM
  5. Replies: 4
    Last Post: 07-25-2010, 04:21 PM
  6. How do I display module results in a form text box
    By drewship in forum Access Programming / VBA / Macros
    Replies: 5
    Last Post: 08-14-2009, 04:40 PM
  7. Cells display function's text rather than its results
    By tonerowlabs in forum Excel General
    Replies: 4
    Last Post: 07-08-2006, 07:55 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