Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8273285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:25:15+00:00 2026-06-08T07:25:15+00:00

I have a Google Sheets with the following formula: =IFERROR(IF(AA3=,,MID((LEFT(AA3,LEN(AA3)-1)),FIND(|,AA3)+1,30))) now this returns a

  • 0

I have a Google Sheets with the following formula:

=IFERROR(IF(AA3="","",MID((LEFT(AA3,LEN(AA3)-1)),FIND("|",AA3)+1,30)))

now this returns a number.

The weird thing is it works in 100% of the cases and returns the appropriate number, if however I try and calculate with this number in a few odd occasions the new formula fails, telling me the “number” is not a number.

Example:

(-121|102)  -121    102  -->the first is a combination which I then break apart into -121 and 102

Copy the formulas down and all work 100%.

I then carry on to process these numbers and on the odd occasion, the formula tells me the “102” is not a number.

Below a sample output:

    (-121|102)  -121    102     76.00
    (-238|139‎)  -238    139‎       #VALUE!
    (-297|52)   -297     52     395.73
    (-127|201)  -127    201     186.81
    (-186|149)  -186    149     336.89
    (-141|120)  -141    120     290.08
    (-106|97‎)   -106     97‎       #VALUE!
    (-238|139‎)  -238    139‎       #VALUE!
    (-297|52‎)   -297     52‎       #VALUE!
    (-160|221)  -160    221     290.06
    (-197|200)  -197    200     294.55
    (-238|139‎)  -238    139‎       #VALUE!
     (-19|10)    -19     10       #VALUE!
     (-21|22)    -21     22     323.83

Is there anything I can put in the formula that would force the output to be a number?

=IFERROR(IF(AA3="","",MID((LEFT(AA3,LEN(AA3)-1)),FIND("|",AA3)+1,30)))
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T07:25:17+00:00Added an answer on June 8, 2026 at 7:25 am

    The problem is caused by “invisible” non-numeric characters in some of your cells. If you list the character codes of one of the invalid numbers, for example line 2 in your sample output, you will see that there is a fourth invisible character with code 8206 at the end of the text. You can use this formula to verify this fact (provided the cell is at position AA2):

    =CODE(MID(AA2,FIND("|",AA2)+4,1))
    

    You should be able to use regular expression replacement to get rid of the non-numerical characters, like this:

    =REGEXREPLACE(/* some text */,"[^0-9]","")
    

    A valid formula for extracting the second numerical value from one text cell based on your original formula would thus be:

    =IF(AA2="","",REGEXREPLACE(MID(LEFT(AA2,LEN(AA2)-1),
                                   FIND("|",AA2)+1,30),"[^0-9]",""))
    

    However, I would recommend a more stable formulation for identifying the second value, based on the positions of both | and ):

    MID(AA2,FIND("|",AA2)+1,FIND(")",AA2)-FIND("|",AA2)-1)
    

    yielding the following resulting formula for sufficiently extracting the second numerical value from the text cell:

    =IF(AA2="","",REGEXREPLACE(MID(AA2,FIND("|",AA2)+1,
                                   FIND(")",AA2)-FIND("|",AA2)-1),"[^0-9]",""))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a user that created about 50 sheets inside a Google Spreadsheet. Each
I have google'd it, and tried some examples, but I always get stuck. This
I have a Google Sheets of the translations of all my strings.xml resources. Each
So I have this google script that I want to use to create charts
I have a Google Sheets that has two columns. Second column is numbers only,
So I have a Google Form that feeds a Google Docs Spreadsheet. This form
I have google analytics on my site. One page has a button which when
I have google adsense in a block, and I want to hide the block
I have google analytics set on a site I'm working on, It has a
I have google maps added to UIWebview. I want to zoom the map to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.