+ Reply to Thread
Results 1 to 8 of 8

Indent Function

  1. #1
    Forum Contributor
    Join Date
    11-02-2007
    Location
    Bryne, Norway
    MS-Off Ver
    Microsoft Office Excel 2010
    Posts
    230

    Indent Function

    I'm looking for an UDF Indent Function. There is one in the link below, but this is not true Indent. It is spaces before the text. Any suggestions?

    http://www.excelforum.com/excel-gene...-function.html
    Last edited by mkvassh; 05-16-2010 at 12:27 PM.

  2. #2
    Forum Contributor
    Join Date
    05-16-2010
    Location
    UK
    MS-Off Ver
    2003 and 2007
    Posts
    252

    Re: Indent Function

    What are you trying to achieve with the Indent. Would you want to apply different levels of indents based on cell criteria/formatting? Would a macro using the InsertIndent method in VBA meet your requirements?

  3. #3
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Indent Function

    Hi
    Don't know if u like it but u can use this function
    =IF(ISNUMBER(A1),B1,CONCATENATE(REPT(" ",10),B1))

    See attached for more info...
    Attached Files Attached Files
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  4. #4
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Indent Function

    Excel wont allow a "True Indent" as indenting generally uses tab, which cells wont accept :-

    =REPT(CHAR(9),4)&"TEXT"

    char 9 is the tab character, so the only way to emulate is to use spaces as in the udf you referenced
    Regards
    Darren

    Update 12-Nov-2010 Still job hunting!

    If you are happy with the results, please add to our reputation by clicking the blue scales icon in the blue bar of the post.

    Learn something new each day, Embrace change do not fear it, evolve and do not become extinct!


  5. #5
    Forum Contributor
    Join Date
    11-02-2007
    Location
    Bryne, Norway
    MS-Off Ver
    Microsoft Office Excel 2010
    Posts
    230

    Re: Indent Function

    OK. Thank you

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Indent Function

    Try this. E.g.,

    =SetIndent(A1, B1), where A1 is the cell to be indented, and B1 contains the indent level.

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Registered User
    Join Date
    11-21-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Indent Function

    Holy cow this works unbelievably well.

  8. #8
    Registered User
    Join Date
    09-01-2010
    Location
    San Juan, PR
    MS-Off Ver
    Excel 365
    Posts
    3

    Re: Indent Function

    This is a great function! Thanks.

    Just a note on behavior: the formula is placed parallel to the cell with the original text, and when recalc'ed, actually modifies the original text.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1