【问题标题】:Excel formula to extract numbers from stringExcel公式从字符串中提取数字
【发布时间】:2018-04-16 13:44:37
【问题描述】:

我在 excel 中有一个列,它包含两种类型的字符串

  1. (423) 242-0045 begin_of_the_skype_highlighting (423) 242-0045 免费 end_of_the_skype_highlighting

  2. (630) 472-1900 begin_of_the_skype_highlighting (630) 472-1900 免费 end_of_the_skype_highlighting, (773) 878-7340 begin_of_the_skype_highlighting (773) 878-7340 免费 end_of_the_skype_highlighting

=IF(FIND(",",C2),LEFT(C2,FIND("begin",C2)-2)&","&MID(C2,FIND(",",C2)+2,14),MID(C2,FIND("begin",C2)+2,14))

上面的公式可以提取电话号码。 喜欢:

  1. (423) 242-0045
  2. (630) 472-1900, (773) 878-7340

但它适用于 2. 类型的字符串,但不是第一个。

任何帮助将不胜感激

【问题讨论】:

标签: excel excel-formula


【解决方案1】:

试试这个公式(假设输入格式适合样本):

=TRIM(LEFT(A1,14)&IFERROR(", "&MID(A1,FIND(",",A1)+2,14),""))

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-14
    相关资源
    最近更新 更多