[英]In Excel Check phrases in two cell and in the two cell if any listed word found,need to add the word in another cell. repeat this for entire column
[英]Wrap cell text without dividing any word characters into two lines
這個答案的想法完全是 go 到@Ike 和@Brennan。
我只是將其轉換為 VBA 代碼,以方便遇到相同問題的任何人。
Sub Replace_non_breaking_space()
'Chr(160) is the (non_breaking_Space)
'Chr(32) is the normal Space
Dim ws As Worksheet
Set ws = ActiveSheet 'adapt to your need
Dim cel As Range
For Each cel In ws.Range("A2:A4")
cel = Application.Trim(Replace(cel, Chr(160), Chr(32)))
Next cel
ws.Range("A2:A4").WrapText = True
End Sub
您的數據中可能有“壞空格”,這意味着 Excel 沒有正確地將空格字符識別為分割文本的首選位置。 嘗試復制 Pressure 和 Vessel 之間的空格字符,然后查找並替換為正常的空格字符。
編輯:既然您知道您的空間是 160,請在 alt+0160 上查找替換為 alt+0032
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.