+ Reply to Thread
Results 1 to 5 of 5

trying to set a text value in if function

Hybrid View

  1. #1
    Registered User
    Join Date
    04-19-2012
    Location
    uk
    MS-Off Ver
    Excel 2007
    Posts
    18

    trying to set a text value in if function

    trying to set a text value in if function

    in cell G4 and G8, the value is less than the value set in cell J4 but it shows Fail, yet in cell J8 with same value it shows Pass. The only variation is in cell G4 it is text value for f f set in C4 and E4 cells. What the output in column J should be 80% of the value in column H. It should show Pass in cell J4
    Last edited by wykoems; 10-05-2017 at 06:42 PM.

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: trying to set a text value in if function

    Does the value have to be a text value? If not, remove the quotes around the number and it will be a number value then the formula should work as expected.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: trying to set a text value in if function

    G4 is not a number it's text, unlike G8 which is a number. You can test this with =ISNUMBER(G4)

    In general though don't enter text 'numbers' in formulae if you want real numbers.
    So instead of
    Formula: copy to clipboard
    =IF(C4="n/a","n/a",IF(E4="n/a","n/a",IF(C4="f f","0.10",IF(E4="f f","0.10",SUM(SUM(C4-E4))))))

    use
    Formula: copy to clipboard
    =IF(C4="n/a","n/a",IF(E4="n/a","n/a",IF(C4="f f",.1,IF(E4="f f",.1,SUM(SUM(C4-E4))))))
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    04-19-2012
    Location
    uk
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: trying to set a text value in if function

    Thanks all for solving and supporting my query, again thank you.

  5. #5
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: trying to set a text value in if function

    You're welcome.

+ 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. Replies: 1
    Last Post: 07-20-2016, 10:12 AM
  2. Replies: 1
    Last Post: 04-24-2014, 12:25 AM
  3. InStr function doesn't find specific text, but finds any text in column and runs code
    By mikey3580 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-27-2014, 03:50 AM
  4. [SOLVED] function IF to return text based if text contains exact text
    By in nomine noctis in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-05-2013, 06:25 AM
  5. Replies: 4
    Last Post: 07-25-2013, 05:28 AM
  6. IF function: Using text in logical_test with multiple variables and replacing with text
    By SarahRachelJones in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-25-2012, 02:17 PM
  7. Replies: 3
    Last Post: 10-27-2010, 03:11 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