Forum Discussion

OndrejPuskar's avatar
OndrejPuskar
Copper Contributor
Aug 19, 2023
Solved

using FIND function to find space possition

Hi, I would like to find position of space in the cell using find function, but for some reason, value error is showing. 

#VALUE!2017-09-01 00:08:12

 

my formula: =FIND(" ",B2,1)

 

link to the sheet:

Book2.xlsx

 

I would be greatful for your support.

  • OndrejPuskar 

    The FIND function in Excel returns the position of a specific substring within a given string. The formula you provided should work correctly to find the position of the first space in cell B2. However, if you are encountering a #VALUE! error, there are a few potential reasons to consider:

    1. Text Not Found: If there is no space character (" ") within the cell B2, the FIND function will return an error. Make sure that the cell actually contains a space character.
    2. Data Type Issue: Sometimes, when you copy and paste data from external sources, the space character might not be a true space but could be a different non-printable character that looks like a space. This can cause the FIND function to return an error. Try manually deleting and re-typing the space character in the cell to ensure it's a valid space.
    3. Cell Format: The cell might have a formatting issue that's causing the error. Ensure that the cell containing the formula and the target cell (B2) are both set to the "General" or "Text" format.
    4. Function Syntax: The syntax of the FIND function you provided is correct: =FIND(" ", B2, 1). The third argument (start_position) is optional and by default is set to 1, so you can omit it in this case.
    5. Non-Printable Characters: Sometimes, there could be non-printable characters or invisible characters in the cell that you cannot see but might affect the FIND function's behavior. If that is the case, you might need to clean up the data before using the function.

    If none of these suggestions resolves the issue, you might consider providing more context about the data in cell B2 and the steps you have taken so far. Additionally, you can try the following troubleshooting steps:

    • Use the LEN function to check the length of the content in cell B2: =LEN(B2). This will give you the count of characters in the cell, which can help identify if there are any unexpected characters.
    • Copy and paste the content of cell B2 to a different cell and then use the FIND function on the copied content. This can help isolate whether the issue is related to the cell itself or the content within it.
    • If you are still encountering the error, try the formula on a different cell with a simple string containing a space character to see if the FIND function works as expected.

    The text and steps were created with the help of AI.

    My answers are voluntary and without guarantee!

    Hope this will help you.

    • OndrejPuskar's avatar
      OndrejPuskar
      Copper Contributor
      It is part of the Google Analytics certificate, but I have found the error, it is due the wrong formatting. They used custom formatting which causes errors.
      • Detlef_Lewin's avatar
        Detlef_Lewin
        Silver Contributor

        OndrejPuskar 


        I have found the error, it is due the wrong formatting. They used custom formatting which causes errors.

        Hmm... when I remove the custom format the error is still there. Because there is NO space in B2.

         

  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    OndrejPuskar 

    The FIND function in Excel returns the position of a specific substring within a given string. The formula you provided should work correctly to find the position of the first space in cell B2. However, if you are encountering a #VALUE! error, there are a few potential reasons to consider:

    1. Text Not Found: If there is no space character (" ") within the cell B2, the FIND function will return an error. Make sure that the cell actually contains a space character.
    2. Data Type Issue: Sometimes, when you copy and paste data from external sources, the space character might not be a true space but could be a different non-printable character that looks like a space. This can cause the FIND function to return an error. Try manually deleting and re-typing the space character in the cell to ensure it's a valid space.
    3. Cell Format: The cell might have a formatting issue that's causing the error. Ensure that the cell containing the formula and the target cell (B2) are both set to the "General" or "Text" format.
    4. Function Syntax: The syntax of the FIND function you provided is correct: =FIND(" ", B2, 1). The third argument (start_position) is optional and by default is set to 1, so you can omit it in this case.
    5. Non-Printable Characters: Sometimes, there could be non-printable characters or invisible characters in the cell that you cannot see but might affect the FIND function's behavior. If that is the case, you might need to clean up the data before using the function.

    If none of these suggestions resolves the issue, you might consider providing more context about the data in cell B2 and the steps you have taken so far. Additionally, you can try the following troubleshooting steps:

    • Use the LEN function to check the length of the content in cell B2: =LEN(B2). This will give you the count of characters in the cell, which can help identify if there are any unexpected characters.
    • Copy and paste the content of cell B2 to a different cell and then use the FIND function on the copied content. This can help isolate whether the issue is related to the cell itself or the content within it.
    • If you are still encountering the error, try the formula on a different cell with a simple string containing a space character to see if the FIND function works as expected.

    The text and steps were created with the help of AI.

    My answers are voluntary and without guarantee!

    Hope this will help you.

Resources