![](/img/trans.png)
[英]Excel: Use number from one cell to write a string in another cell
[英]Is there a way to output a string from one excel cell to another?
我想 output 一個字符串從一個單元格到另一個單元格。 該字符串將始終以#0 開頭,然后將有 4 到 7 個字符。 例如,對於這個單元格:
UI-ESR25893-TA-03-0022 STEAMPLANT-#0009-R1 - Utility Tie-In Drawings-handled out of DRS - close
我想 output "0009-R1" 到新單元格。
您可以使用以下公式來執行此操作,其中示例文本位於單元格 A1 中
=MID(A1,FIND("#0",A1,1)+1,FIND(" ",A1,FIND("#0",A1,1))-FIND("#0",A1,1)-1)
在哪里,
FIND("#0",A1,1)
定位到 position 存在 #0 的位置,然后我們將其加 1 以消除 #。
FIND(" ",A1,FIND("#0",A1,1))
定位出現#0后的第一個空格
FIND(" ",A1,FIND("#0",A1,1))-FIND("#0",A1,1)-1
計算出字符串的確切長度。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.