+ Reply to Thread
Results 1 to 6 of 6

If function for text values

  1. #1
    Registered User
    Join Date
    08-28-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    8

    If function for text values

    I would like the following to occur in a spreadsheet I am working with,

    If contents of D5 is greater than or equal to 5, then contents in M5 should output 'Yes'
    If contents of D5 is less than or equal to 5, then contents in M5 should output 'No'

    However contents in D5 is both numerical & text e.g. 1 - Low; 7 - Moderate ......

    Can you please asist me with coming up with the correct formulaes that will allow me to achieve the above?

    I currently have the following formula and its working well when I use only numbers in D5 and not both numbers and text.
    =IF(D5<=5,"No","Yes")

    If I change the formula to =IF(D5="Low","No","Yes") it gives me an error.

    Any assistance will be sincerely appreciated.
    Last edited by Ehezve; 08-29-2013 at 12:06 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,872

    Re: If function for text values

    =if(Left(D5,1)<=5,"No","Yes")

    Try the above
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: If function for text values

    May be this...

    In M5 Cell

    =IF(ISNUMBER(VALUE(LEFT(D5,FIND("-",D5)-1))),IF(VALUE(LEFT(D5,FIND("-",D5)-1))>=5,"Yes","No"),"")


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: If function for text values

    Alan, =left() will always return text, so that wll always return YES, no matter the "value" is
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,872

    Re: If function for text values

    @FDibbins--Thanks. A sure sign its time for bed.

    It should read: =IF(VALUE(LEFT(A1,1))<=5,"Yes","No")

    Now to sleep. Perchance to dream.

  6. #6
    Registered User
    Join Date
    08-28-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: If function for text values

    Thank you so much Alan / Dibbins & Sixthsense. It worked perfectly well. Sincerely appreciate every help.

+ 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] How to use MINIF function on text values
    By mmyers in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-04-2012, 09:11 PM
  2. Best function to sum quantities associated with text values?
    By golfretailer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-18-2010, 02:29 AM
  3. RE: How to Insert function right on text values e.g. 0180001640
    By Gary Brown in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-18-2005, 01:06 PM
  4. [SOLVED] how do I insert a function that chooses between two text values?
    By Gailwdz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-04-2005, 03:06 AM
  5. Ignore Text, function only for numerical values
    By Daniel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-12-2005, 02:06 PM

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