无法使用公式从字符串中获取文本的第一部分 [英] Can't get the first part of a text from a string using formula

查看:73
本文介绍了无法使用公式从字符串中获取文本的第一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个公式,以获取与位于单元格A1中的字符串之间用空格分隔的某些文本的第一部分.但是,它不起作用.我的配方做错了吗?预先感谢.

I've written a formula to get the first part of some text separated by space from a string located in cell A1. However, it doesn't work. Am I doing something wrong with my formula? Thanks in advance.

这是主字符串:

HOUSTON TX 77017-2328

我尝试过的公式:

=LEFT(A1,FIND(" ",A1)-1)

我期望的输出:

HOUSTON

推荐答案

您有一个程式化的空间:char(160)vs char(32)

You have a stylized space: char(160) versus char(32)

您可以用普通空格替换所有空格或使用以下公式:

You can either replace all those with normal spaces or use this formula:

=LEFT(A1,FIND(CHAR(160),A1)-1)

这篇关于无法使用公式从字符串中获取文本的第一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆