/docs/community?hl=en
/docs/community?hl=en
10/4/13
Original Poster
Jersmatrix

How to put indent to a spreadsheet cell

I struggle with this for so long and maybe I could give enlightenment for other people who could not find a work around for this simple feature that we are requesting from google. Please see below how to make a spaces inside a cell.

=CONCAT(REPT( CHAR( 160 ), 5), "TESTING")


5 = number of space you want to have before the work TESTING
Community content may not be verified or up-to-date. Learn more.
Recommended Answer
Was this answer helpful?
How can we improve it?
All Replies (24)
--Hyde
10/4/13
--Hyde
Hi Jersmatrix,

Thank you for the contribution!

I believe that non-breaking space characters can also be entered through  space on a Mac, and most likely through some Alt+space key on a Windows box. Copy and paste from a text editor that can produce non-breaking spaces should work as well.

Cheers --Hyde

Scott Rhys Jones
12/9/13
Scott Rhys Jones
Thansk for theinfo but....we shouldn't have to have a work around!
enjoypb
12/29/13
enjoypb
Well, they're probably short on development funding?

That's not even worth an lol. This is beyond ridiculous. Has spreadsheets changed any in the last 2-3 years? I left Drive because of things like this and it appears nothing has changed.

Oddly we can indent in this tool??? 

Ugh
Google user
1/4/14
Google user
Awesome!!

Thanks
leighelliott78
3/3/14
leighelliott78
I had the same issue and was using Google Spreadsheets to create a MS Project type of file with tasks appearing on each line and having groups of tasks indented to visually show grouping.  The best workaround I could come up with was to write my own Google script to automate this.

To do this open up the spreadsheet and select menu item "Tools" --> "Script Editor"
Once the script editor opens copy and paste the following code into the "Code.gs" window:

var ss = SpreadsheetApp.getActiveSpreadsheet();

function indentText() {
 
var values = ss.getActiveRange().getValues();
 
var newValues = new Array();
 
 
for (i = 0; i < values.length; i++) {
   
if (values[i][0] != '') {
      newValues
.push(['=CONCAT(REPT( CHAR( 160 ), 5),"' + values[i][0] + '")']);
   
} else {
      newValues
.push(['']);  
   
}
 
}
 
  ss
.getActiveRange().setValues(newValues);
 
};

function onOpen() {
 
var sheet = SpreadsheetApp.getActiveSpreadsheet();
 
var entries = [{
    name
: "Indent Text",
    functionName
: "indentText"
 
}];
  sheet
.addMenu("Indent Text", entries);
};

Go to menu "File" --> "Save"
Return to your spreadsheet and reload the browser.  You should now see a new menu item called "Indent Text" to the right of the "Help" menu.

What this code does is add a menu to the spreadsheet document called "Indent Text". 
Within this menu it will create a menu item called "Indent Text".
When the "indent Text" menu item is selected any cells within a single column selection will be indented by 5 spaces.

You can increase or decrease the number of spaces the text is indented by changing the line below so that the "5" is changed to a larger or smaller number (depending on your preference)

      newValues.push(['=CONCAT(REPT( CHAR( 160 ), 5),"' + values[i][0] + '")']);

This code will work on multiple cells so you can select an entire column and indent in bulk.  If anyone finds any bugs let me know.

Hope people find this useful (at least as a workaround until Google adds the feature, touch wood).

Regards,
Leigh.

 


18 MORE
Google user
5/27/14
Google user
Love it! But it only saves to the one spreadsheet and doesn't appear in new sheets. Am I missing something?
Consider submitting this to the Add-Ons list! 
 
This question is locked and replying has been disabled. Still have questions? Ask the Help Community.

Badges

Some community members might have badges that indicate their identity or level of participation in a community.

 
Expert - Google Employee — Googler guides and community managers
 
Expert - Community Specialist — Google partners who share their expertise
 
Expert - Gold — Trusted members who are knowledgeable and active contributors
 
Expert - Platinum — Seasoned members who contribute beyond providing help through mentoring, creating content, and more
 
Expert - Alumni — Past members who are no longer active, but were previously recognized for their helpfulness
 
Expert - Silver — New members who are developing their product knowledge
Community content may not be verified or up-to-date. Learn more.

Levels

Member levels indicate a user's level of participation in a forum. The greater the participation, the higher the level. Everyone starts at level 1 and can rise to level 10. These activities can increase your level in a forum:

  • Post an answer.
  • Having your answer selected as the best answer.
  • Having your post rated as helpful.
  • Vote up a post.
  • Correctly mark a topic or post as abuse.

Having a post marked and removed as abuse will slow a user's advance in levels.

View profile in forum?

To view this member's profile, you need to leave the current Help page.

Report abuse in forum?

This comment originated in the Google Product Forum. To report abuse, you need to leave the current Help page.

Reply in forum?

This comment originated in the Google Product Forum. To reply, you need to leave the current Help page.