Excel:如何仅提取单元格字符串中存在的6位数字? [英] Excel: How to extract only the 6 digit number present in a cell string?

查看:465
本文介绍了Excel:如何仅提取单元格字符串中存在的6位数字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一列具有以下数据(按行):

I have a column with following data(rowwise) :

纽约真的很好456983美食

New York is really nice, 456983 Good food

北京很棒678932,文化很好.

Beijing is awesome 678932, Nice culture.

.... so on

....so on

我只想提取原始列中的6位数字并将其放置在按行排列的原始列旁边的另一列中

I want to extract only the 6 digit numbers in the original column and place it in another column beside the original column arranged rowwise

有n行...

没有VBA,有没有办法做到这一点?

Is there any way to do this without VBA?

请告诉我一些公式...

Please tell me some formula...

我不知道

推荐答案

在没有VBA的情况下,您可以使用以下Excel公式,假设A1是包含文本的单元格.

Without VBA, you can use the following Excel formula assuming A1 is the cell containing the text.

=MID(A1,FIND("------",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"0","-"),"1","-"),"2","-"),"3","-"),"4","-"),"5","-"),"6","-"),"7","-"),"8","-"),"9","-")),6)

这篇关于Excel:如何仅提取单元格字符串中存在的6位数字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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