excel怎么判断字符串中是否包含非汉字字符?
时间:2023-08-03 17:45:50
excel怎么判断字符串中是否包含非汉字字符?在数据班级信息的时候,姓名、性别都是汉字才能正确,怎么判断excel表格中不是汉字的字符呢?下面我们就来看看详细的教程,需要的朋友可以参考下
在Excel电子表格中,我们经常遇到需要输入“姓名”的情况。一般情况下,姓名只能使用汉字,不能使用数字、字母等。那么,如何判断“姓名”数据的合法性呢?本文将通过len和lenb函数来实现。
1、样表如下:姓名、性别两列数据。
2、len函数和lenb函数都可以获得一个字符串的长度,不同的是len获得的字符个数,lenb是以字节为单位。一个字符=2个字节,汉字占两个字节,数字和字母均占一个字节,所以我们可以用以下公式判断字符串中是否包括汉字。
=IF(LENB(A2)=2*LEN(A2),"汉字","含有非汉字字符")
3、公式应用以后的效果如下图所示:
标签:excel,汉字,字符
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Win10 20H2死机频繁没反应怎么解决?Win10 20H2死机频繁没反应解决方法
2023-12-13 09:05:20
![](https://img.aspxhome.com/file/2023/1/a280937_0s.jpg)
KB4524244有哪些存在的问题_KB4524244已存在的问题介绍
2023-06-11 00:52:40
![](https://img.aspxhome.com/file/2023/2/a286204_0s.jpg)
Win10打开任务管理器法的方法汇总
2022-08-06 11:24:31
![](https://img.aspxhome.com/file/2023/1/a274325_0s.jpg)
Win10电脑玩游戏显示缺少msvcp140.dll怎么办?
2023-10-31 02:00:13
![](https://img.aspxhome.com/file/2023/25/a218527_0s.jpg)
pr如何快速跳到下一个标记点上面?pr怎么跳到下一个标记点教程
2023-12-19 02:16:39
![](https://img.aspxhome.com/file/2023/30/a267590_0s.jpg)
Win8.1提示“未安装任何音频输出设备”的解决办法
2022-07-12 15:42:26
![](https://img.aspxhome.com/file/2023/29/a260318_0s.jpg)
Win10 Mobile RS2预览版14904升级截图曝光
2022-06-26 22:13:07
![](https://img.aspxhome.com/file/2023/28/a243898_0s.png)
怎么使用WPS表格进行聊天
2022-11-03 06:29:55
![](https://img.aspxhome.com/file/2023/7/a170887_0s.jpg)
word怎么同时旋转表格和文字?
2022-05-04 10:14:22
![](https://img.aspxhome.com/file/2023/0/22880_0s.png)
如何对excel工作表进行隐藏
2023-05-31 10:28:23
![](https://img.aspxhome.com/file/2023/5/a154665_0s.png)
WPS表格中如何制作折线图图文教程
2023-06-04 16:31:05
KB450327更新了什么?KB450327更新内容介绍
2023-11-12 04:52:01
![](https://img.aspxhome.com/file/2023/2/48422_0s.jpg)
win10安全中心任务栏不显示的解决方法
2022-06-10 19:31:06
![](https://img.aspxhome.com/file/2023/4/a309170_0s.png)
手机安装包的格式有哪些?iOS安装包是什么格式
2022-11-21 15:25:28
dnf补丁怎么删除?小编教你DNF如何清理原来的补丁!
2023-05-19 01:14:56
![](https://img.aspxhome.com/file/2023/6/a324577_0s.png)
如何使用wps文本拼写检查功能
2023-08-12 06:16:59
![](https://img.aspxhome.com/file/2023/9/a170689_0s.jpg)
sm56hlpr.exe - sm56hlpr是什么进程
2022-04-25 15:21:38
迅捷视频转换器怎么剪辑音频?迅捷视频转换器剪辑音频的方法
2023-08-09 20:45:12
![](https://img.aspxhome.com/file/2023/8/a334174_0s.jpg)
驱动人生nvidia安装程序无法继续_驱动人生nvidia安装无法继续解决方法
2022-11-18 02:14:04
![](https://img.aspxhome.com/file/2023/3/a301022_0s.jpg)
win10专业版怎么查看蓝屏记录?
2023-11-23 18:19:58
![](https://img.aspxhome.com/file/2023/0/50020_0s.jpg)