简体   繁体   中英

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. However, as some cells are empty, I had to use conditional ISEMPTY for the formula to work:

""&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).

Is there a way I could use an another conditional like ISEMPTY(ISEMPTY...) to get rid of those?

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. 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. Blank cell adds no data and no space.

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

Maybe you should learn about TEXTJOIN..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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