Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google spreadsheet left formula with ellipsis

I'm using importxml to import some data from an other website. This results in some cells to show long text. I'm using =LEFT formula to limit the number of characters in a cell but words stop very abruptly and i was wondering if i can add ellipsis ... (three dots which mean "text continues") to my formula. Something like =LEFT(B25;600) ... which should result in "word word w..." Is this possible?

I tried adding three dots in next cell but they show even when text is not shortened so it does not make sense.

like image 658
John Grischam Avatar asked Nov 04 '25 03:11

John Grischam


2 Answers

yes, use:

=LEFT(B25; 600)&"..."

update:

=IF(LEN(B25)>600; LEFT(B25; 600)&"..."; B25)
like image 81
player0 Avatar answered Nov 06 '25 02:11

player0


I would only add the ellipsis when there are more than 600 characters

=IF(LEN(A1)>600;CONCATENATE(LEFT(A1;600);"...");A1)

This formula is from LibreOffice Calc

like image 22
Gerard H. Pille Avatar answered Nov 06 '25 04:11

Gerard H. Pille



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!