excel中right函数的运用方法
发布时间:2017-05-05 18:27
相关话题
在表格处理中,常常需要在字符串中提取部分字符,以进行下一步处理,例如从身份证号码中提取指定位数的数字,以判断身份证的性别等,手动操作较繁琐,利用excel提供的文本处理函数则可以很方便地解决问题。今天,小编就教大家在Excel中right函数的运用方法。
Excel中right函数的运用方法如下:
right函数,从字符串右侧首字符开始,从右向左提取指定的字符,其功能和LEFT函数完全一样,只是方向不同。
在以下表格中利用RIGHT函数从右开始提取指定的字符,

要求:提取3个字符, 在B2单元格输入公式:=right(a2,3),回车即可,
说明:要提取n个字符,函数中的参数2就设为相应的数值。




函数的参数2可省略,省略后函数默认提取一个字符。


函数的参数2支持使用数组,表示分别提取指定的字符,例如,分别提取1-6个字符,
在E2:E7单元格区域,输入数组公式:=RIGHT(A3,{1;2;3;4;5;6}),按下ctrl+shift+enter输入数组公式,表示从右开始分别提取1-6个字符。


参数2还可以用row(indirect("1:"&len())的形式来表示,row和indirect函数相配合返回一个垂直数组,而使用column和indtrect函数相配则返回一个水平数组。
例如,要从右开始分别返回1-n的字符,可在A9-j9单元格区域输入数组公式:=RIGHT(A3,COLUMN(INDIRECT("1:10"))),
即可从右开始分别提取1-10个字符,构成一个水平数组。


excel中right函数的运用方法的评论条评论