+ Reply to Thread
Results 1 to 3 of 3

Compare a text and a number value

Hybrid View

  1. #1
    Registered User
    Join Date
    04-16-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    45

    Compare a text and a number value

    Hey,

    So the problem that I want to try and resolve is that I need a cell to look at a word as a number value, then subtract a number off of the word value, compare that value to another number and say whether it passes or fails.

    Example

    C1=PumpA
    C2=12
    C3=Result

    I tried to write it myself and it looked something like this.

    =IF(C1="PumpA", ((C2-10)<10)="Fail", "Pass")

    Please Help!

  2. #2
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Compare a text and a number value

    Dagoon, is there a limited list of words? Is there any logic behind how the numeric values are attributed to the words?
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  3. #3
    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
    53,044

    Re: Compare a text and a number value

    Hi

    Im not really sure what you are trying to do, but try this...

    =IF(C1="PumpA", if(C2-10<10,"Fail","Pass"),"")
    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

+ 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