I have a spreadsheet A, and use import/query command to generate a spreadsheet B, but I wish the selected column display only first 7 characters.
e.g. A has a 1234567890abcdef string, but after apply the select command such as:
=query(importrange("docid","sheetname!A:M"),"select Col1")
Then wish the output is 1234567 (first 7 characters) but not the whole string 1234567890abcdef.
I wish below command can work but actually not:
=query(importrange("docid","sheetname!A:M"),"select left(Col1,7)")
try wrapping the left function around the query, like:
=Arrayformula(Left(query(importrange("docid","sheetname!A:M"),"select Col1"),7))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With