+ Reply to Thread
Results 1 to 6 of 6

If function to ignore '+' & "-" symbols

  1. #1
    Forum Contributor
    Join Date
    01-04-2016
    Location
    Newcastle
    MS-Off Ver
    2016
    Posts
    107

    If function to ignore '+' & "-" symbols

    So I'm doing an IF to bring back a value if the number contained in a cell is greater than the number in my formula:

    =IF(N7>=8,"Y","N")

    Nice & easy, The number values are only one to nine.

    However the issue is some of these numbers have a '+' or "-" symbol after the number. (So a value could be '8+' or '8-', for example)

    My IF then ignores this value entirely as it doesn't pick it up as a number.

    So i need my formula to ignore the +/- symbol.

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: If function to ignore '+' & "-" symbols

    Try...
    =IF(LEFT(N7,LEN(N7)-1)*1>=8,"Y","N")

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,705

    Re: If function to ignore '+' & "-" symbols

    You could try it like this:

    =IF(--SUBSTITUTE(SUBSTITUTE(N7,"+",""),"-","")>=8,"Y","N")

    Hope this helps.

    Pete

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,901

    Re: If function to ignore '+' & "-" symbols

    Try this ...

    =IF(SUBSTITUTE(SUBSTITUTE(N7,"+",""),"-","")+0>=8,"Y","N")

  5. #5
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: If function to ignore '+' & "-" symbols

    =if(substitute(n7,{"+","-"},{"",""})+0>=8,"y","n")
    Last edited by mcmahobt; 05-16-2017 at 08:31 AM.
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  6. #6
    Forum Contributor
    Join Date
    01-04-2016
    Location
    Newcastle
    MS-Off Ver
    2016
    Posts
    107

    Re: If function to ignore '+' & "-" symbols

    Thanks all substitute worked best.

+ 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: 5
    Last Post: 02-05-2019, 12:03 AM
  2. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  3. Data Validation - how to ignore cells with "0" or "-"
    By dgibney in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-29-2015, 08:16 PM
  4. Using the "DAYS360" function-ignore blank cell
    By wvpersephone13 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-17-2014, 12:54 AM
  5. [SOLVED] Counting data only contains text (ignore mark "-" & "")
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-12-2014, 09:45 PM
  6. [SOLVED] Need function to recognise "< or>" symbols
    By sam beginer in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-10-2013, 03:15 AM
  7. VB Macro for Proper Case to Ignore "/" & "-"
    By jlcford in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-08-2008, 07:49 AM

Tags for this Thread

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