简体   繁体   English

如何摆脱数字应用程序中的 ISBLANK 多余空格?

[英]How to get rid of ISBLANK extra spaces in number app?

This is on Numbers on Mac: I generate a paragraph of text from a row where columns hold parts of text.这是在 Mac 上的 Numbers 上:我从列包含部分文本的行中生成一段文本。 However, as some cells are empty, I had to use conditional ISEMPTY for the formula to work:但是,由于某些单元格是空的,我不得不使用条件 ISEMPTY 来使公式起作用:

""&B9&" "&IF(ISBLANK(C9);"";C9)&" "&IF(ISBLANK(D9);"";D9)&" "&IF(ISBLANK(E9);"";E9)&" "&IF(ISBLANK(F9);"";F9)&" "&G9&" "&H9&""

This does function, but I end up with double spaces in areas where I have one or more columns empty (so the spaces double).这确实是 function,但我最终在我有一个或多个空列的区域中出现双空格(所以空格加倍)。

Is there a way I could use an another conditional like ISEMPTY(ISEMPTY...) to get rid of those?有没有办法我可以使用像 ISEMPTY(ISEMPTY...) 这样的另一个条件来摆脱那些?

This is not a huge problem, but is annoying and time consuming, because I have to fix these texts afterwards (there is a lot of them).这不是一个大问题,但很烦人且耗时,因为我必须在之后修复这些文本(有很多)。 :-( :-(

Change the parts with &" "& from IF(ISBLANK(C9);"";C9)&" "& into IF(ISBLANK(C9);"";C9&" ")& In your formula you check if C9 is blank.将带有&" "&的部分从IF(ISBLANK(C9);"";C9)&" "&更改为IF(ISBLANK(C9);"";C9&" ")&在您的公式中,您检查C9是否为空白. Whether blank or not it's followed by a " " space.无论是否为空白,其后跟一个" "空格。 So if blank you get a space added, but no data prior to it.因此,如果空白,您会添加一个空格,但之前没有数据。 If the next is empty too, you get another space without data etc.. By including the &" " inside the if statement it will only add a space if C9 is not blank.如果下一个也是空的,你会得到另一个没有数据等的空格。通过在 if 语句中包含&" "它只会在C9不为空时添加一个空格。 Blank cell adds no data and no space.空白单元格不添加数据和空格。

=TRIM(CONCATENATE(B9;" ";C9;" ";D9;" ";E9;" ";F9;" ";G9;" ";H9))

Maybe you should learn about TEXTJOIN..也许你应该了解 TEXTJOIN ..

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM